Archive: Is SW_HIDE parameter worky ?


Is SW_HIDE parameter worky ?
I'd like to use Sign_0f_Misery Script in my installer. It patches exe and I don't need to include wholly file into my installer ( I save some space )
I use this code

SetOutPath "$INSTDIR\"
File "Files\toeng.exe"
ExecShell "" "$INSTDIR\toeng.exe" SW_HIDE

It works , but Sign_0f_Misery Script (torus.exe) window still appears while patching (then it autoclose)... How can I hide it ? Why SW_HIDE parameter doesn't work ? What should I use instead ?

You can find toeng.exe in the attachment. It will patch any file named as "FlashpointPreferences.exe" (patcher doesn't check size,checksum etc)

WinMain includes "int nCmdShow" parameter coming from CreateProcess() structs call, but program (toeng.exe) can ignore this.


Takhir
And what should I do? Write my own patcher without windows?


It's my thoughtlessness again ...:(
I found an optian in Sign_0f_Misery "not to show window" :)


Another way is to use Exec instead of ExecWait, to 'catch' app's window and to use ShowWindow(SW_HIDE). After this to wait for process exit (using WaitForSingleObject or GetExitCodeProcess).


Use nsExec (found in the contrib directory) and it'll do what you want.