Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Run Command with environment variables containing spaces #757

Closed
wants to merge 3 commits into from

Conversation

lifenjoiner
Copy link
Contributor

Align with Win + R, for convenience.
Test example: %ProgramFiles%.

@zufuliu
Copy link
Owner

zufuliu commented Jan 23, 2024

all ExpandEnvironmentStringsEx() + ExtractFirstArgument() requires similar change.

case IDC_SEARCHEXE: could use:

ExtractFirstArgument(arg1, arg1, arg2);
ExpandEnvironmentStringsEx(arg1, COUNTOF(arg1));
ExpandEnvironmentStringsEx(arg2, COUNTOF(arg2));

@zufuliu zufuliu added this to the v4.24.03 milestone Jan 23, 2024
zufuliu pushed a commit that referenced this pull request Jan 24, 2024
Current code fails when environment variable expanded result contains space (e.g. `%ProgramFiles%`).
@zufuliu
Copy link
Owner

zufuliu commented Jan 24, 2024

Committed changes as ca52161, applied similar change to metapath, kept ExpandEnvironmentStringsEx() for lpParameters as the document for SEE_MASK_DOENVSUBST says:

Expand any environment variables specified in the string given by the lpDirectory or lpFile member.

@lifenjoiner
Copy link
Contributor Author

Great!
Careless me.

@lifenjoiner lifenjoiner deleted the varq branch January 24, 2024 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants