Skip to content

Exclude cmd.exe from process spawning#112

Open
Moddimation wants to merge 1 commit intodecompals:mainfrom
Moddimation:main
Open

Exclude cmd.exe from process spawning#112
Moddimation wants to merge 1 commit intodecompals:mainfrom
Moddimation:main

Conversation

@Moddimation
Copy link

@Moddimation Moddimation commented Mar 7, 2026

Hello, this is a simple addition that prevents cmd.exe to be called directly.

I did perceive that ARMCC calls "cmd /c asmasm.exe" when theres assembly inside of c code, which is the reason why i made this patch, and a good example.

I tried to keep it minimal, please review

@encounter
Copy link
Member

encounter commented Mar 11, 2026

This is a reasonable workaround, but it'd probably be better handled in wibo's main: when wibo is launched with wibo cmd /c "foo.exe", we can detect cmd as the application name and parse out the command being attempted to run. It'd be nice to also handle cmd-isms like && rather than assuming it's a single exe being launched, but that could come later.

@Moddimation
Copy link
Author

Moddimation commented Mar 18, 2026

Do I keep this code though? Because if we just skip this, then CreateProcessA wont try to find the executable that isnt cmd.exe, and assumes the exe path is resolved (right?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants