8000 Forward command line arguments for window launchers by firai · Pull Request #1572 · winpython/winpython · GitHub
[go: up one dir, main page]

Skip to content

Forward command line arguments for window launchers #1572

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

Merged
merged 5 commits into from
May 8, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Wrap everything in outer quotes if arguments are passed
  • Loading branch information
firai authored Apr 25, 2025
commit 164cf600c94064b2b7cc670ca4656bad0aef6f32
10 changes: 5 additions & 5 deletions portable/launchers_src/launcher_template_WINDOWS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /
return 1;
}

// Define the command to run
std::wstring target = L"cmd.exe /c \"" LAUNCH_TARGET L"\"";

// Append arguments if present
// Define the command to run and append arguments if present
std::wstring target;
if (!args.empty()) {
target += args;
target = L"cmd.exe /c \"\"" LAUNCH_TARGET L"\"" + args + L"\"";
} else {
target = L"cmd.exe /c \"" LAUNCH_TARGET L"\"";
}

// Configure the process startup info
Expand Down
0