Archive: How to trap makensis error


How to trap makensis error
Dear sir,

i am using following vb command to run makensis automatically in silent mode.

Const NSISCompilerPath As String = "c:\program files\nsis\makensis.exe /v4 /Oc:\dd.txt "

Shell(NSISCompilerPath & FileName, vbNormalFocus)

Please let me know how to trap the error thrown by makensis. thanks in advance

regards
Devdas M. Kamath


It would be better to use a batch file with a Pause instruction at the end. Any reason why you need to do it via a vb script?

Stu


you need the exit code, and maybe even parse std/errout, this is a vb related problem, go ask in a vb forum


Yes, in a batch file you just need to check %ErrorLevel%,
e.g.
echo makensis.exe failed: %ErrorLevel%

Stu