Old 19th June 2013, 08:22   #1
hanen.jomaa
Junior Member
 
Join Date: Mar 2013
Posts: 23
execwait + silent

Hi,

I use ExecWait to execute a script.bat, it works withou any problem.

Just I want having a silent execution, hide the windowµ.

Can I have that please?

Can you help me please.

thx.
hanen.jomaa is offline   Reply With Quote
Old 19th June 2013, 08:41   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quick sanity check: Why not just put the code from the .bat file into your installer? NSIS can do anything a batch file can.
MSG is offline   Reply With Quote
Old 19th June 2013, 09:00   #3
hanen.jomaa
Junior Member
 
Join Date: Mar 2013
Posts: 23
rew

I want doing that,

but in my .bat i have a condition if

it depend of the valu return from executed command, in NSIS, can doing that ?

my script is like :

for /F %%i in ('perl.exe -Version') do set ver=%%i


if "%ver%" EQU "perl not installed " goto install

:install
install perl
hanen.jomaa is offline   Reply With Quote
Old 19th June 2013, 10:27   #4
Nothuman
Junior Member
 
Join Date: Jun 2013
Posts: 5
Arrow

PHP Code:
nsExec::Exec '"$EXEDIR\test.bat"' 
Nothuman is offline   Reply With Quote
Old 19th June 2013, 11:04   #5
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 672
You can get the printed text from a command with nsExec::ExecToStack (and skip batch file):
code:
nsExec::ExecToStack '"perl.exe" -Version'
Pop $0 # return value/error/timeout
Pop $1 # printed text
StrCpy $1 "$1" "" -18 # only keep last 18 characters from the returned string
${If} $1 == "perl not installed"
goto install
${EndIf}

jpderuiter is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump