Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 15th June 2005, 18:46   #1
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
Silent Installer

I am writing an installer that can run silently (with the /S switch) from the command-line. However, I need to the setup application to not give control back to the command-prompt until it has finished execution. Is this possible?
goldy1064 is offline   Reply With Quote
Old 15th June 2005, 20:54   #2
Mæster
Member
 
Join Date: Apr 2003
Location: Germany
Posts: 62
Send a message via ICQ to Mæster Send a message via AIM to Mæster
If we are speaking about batchfiles, I know the following behavior:

code:
MyNsisInstaller.exe /S

The win command promt waits till MyNsisInstaller.exe is closed.

code:
start MyNsisInstaller.exe /S

The win command won't wait and runs further immediatly.

Hope, this helps.
Mæster is offline   Reply With Quote
Old 15th June 2005, 20:59   #3
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
That is the problem I'm having (the win command prompt won't wait and runs further immediatly). I've tried
Setup.exe /S
and
start Setup.exe /S
but both don't solve the problem. Is there a switch that will not fork when I run Setup.exe?
goldy1064 is offline   Reply With Quote
Old 15th June 2005, 21:03   #4
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
Nevermind, I did start /? and have put the /WAIT option so I'm running start /WAIT Setup.exe /S and that's working.

Just as a side note to the developers: a good feature would be a command-line switch to not fork the process when the installer file is run (similar to InstallShield's /sms switch).
goldy1064 is offline   Reply With Quote
Old 16th June 2005, 09:50   #5
shouman
Junior Member
 
Join Date: Jun 2005
Posts: 36
your idea is not so bad.
shouman is offline   Reply With Quote
Old 16th June 2005, 16:40   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
As far as I know, it's impossible. It doesn't wait because the installer is not a command line application but a GUI application.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 16th June 2005, 18:36   #7
Pidgeot
Senior Member
 
Pidgeot's Avatar
 
Join Date: Jan 2002
Location: Denmark
Posts: 135
It's possible to code a program to output to a console despite having a form open - see SF projects like DOSBox and ScummVM for examples of programs that do this. If the console part of the program is set to wait until the form no longer exists (either by checking for its presence or by waiting for a callback of some sort), this would do the trick.

NSIS could be coded to have such a feature, but only use it if a certain switch is specified on the commandline. I think a basic implementation would only involove assigning the form to a variable and constantly check if it isn't NULL, but it's not something I've tested.
Pidgeot is offline   Reply With Quote
Old 16th June 2005, 18:52   #8
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
Both ScummVM and DOSBox are built as console applications. Look for "/subsystem:console" in here and here.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 17th June 2005, 08:55   #9
onad
Senior Member
 
onad's Avatar
 
Join Date: Dec 2004
Location: Turkey
Posts: 447
IDEA:

Build a small console application that starts your Installer
and goes in a waiting loop, then in your installer JUST before all is done you write e.g. and infile and yor starter console detected this in the waitloop. then the console knows that the install is done and can close itself.

Success, be creative and adhere to the API

"Just do it"
onad is offline   Reply With Quote
Reply
Go Back   Winamp 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