bdfy
15th February 2005 13:34 UTC
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)
Takhir
15th February 2005 14:19 UTC
WinMain includes "int nCmdShow" parameter coming from CreateProcess() structs call, but program (toeng.exe) can ignore this.
bdfy
15th February 2005 14:51 UTC
Takhir
And what should I do? Write my own patcher without windows?
bdfy
15th February 2005 15:31 UTC
It's my thoughtlessness again ...:(
I found an optian in Sign_0f_Misery "not to show window" :)
Takhir
15th February 2005 16:36 UTC
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).
cowwoc
15th February 2005 17:25 UTC
Use nsExec (found in the contrib directory) and it'll do what you want.