gracesync
22nd May 2007 00:01 UTC
how can i log the result of the exe file
i have an exe file that returns "0" or "1" after executing it, how do i log this result and if its 1 will execute another command?
(i.e. if the result of the exe file is 1, i need to execute netsh add firewall).
thank you for your help
goldy1064
22nd May 2007 00:20 UTC
Function MyFunction
ExecWait `"mybinary.exe" -aparam` $0
IntCmp $0 0 done
#do additional running
done:
FunctionEnd
gracesync
22nd May 2007 00:43 UTC
thanks..
So the #do additional running ---this is where i execute the netsh add firewall command right?
Afrow UK
22nd May 2007 18:52 UTC
Yes.
Also, if you wish to hide your executable, use nsExec::Exec followed by Pop $0 to get the exit code.
Stu