Skip to content
⌘ NSIS Forum Archive

How to trap makensis error

4 posts

devdas_kamath#

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
Afrow UK#
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
Anders#
you need the exit code, and maybe even parse std/errout, this is a vb related problem, go ask in a vb forum
Afrow UK#
Yes, in a batch file you just need to check %ErrorLevel%,
e.g.
echo makensis.exe failed: %ErrorLevel%

Stu