I have an command line application that has wmain()
entry point. And I launch it from another app using ShellExecuteEx
function. If I set shellExecuteInfo.nShow = SW_HIDE
it still pops out. Is it somehow possible to not show it at all?
Asked
Active
Viewed 167 times
2

LosBlancoo
- 113
- 10
-
4Use a better function: CreateProcess. http://stackoverflow.com/questions/780465/winapi-createprocess-but-hide-the-process-window – deviantfan Aug 05 '16 at 12:09
1 Answers
3
Use CreateProcess
and pass the CREATE_NO_WINDOW
flag.

David Heffernan
- 601,492
- 42
- 1,072
- 1,490
-
It works until you need to launch process that requires elevation. The only way then is to compile command line application as windows app(with `winmain` entry point). And use `ShellExecuteEx`. :) – LosBlancoo Aug 16 '16 at 12:03
-
There are a few options in that scenario depending on your requirements – David Heffernan Aug 16 '16 at 12:17