Question

I am creating an installer that installs several programs and file packages at once, one of these being WinZip, I want the WinZip installer to run in the background, from what I've gathered using /s will make it run in silent mode, BUT the installer still doesn't install. I believe that is because of the selections one must make during the WinZip installation process. so my question is how could I set this up to silently install WinZip in the background? would I need an Answer file? if so how do I get that set-up? any help would be great!

*snippet of my code in the NSIS file:

Section
IfFileExists "C:\Program Files\WinZip\WINZIP32.EXE" Dont_Install 
SetOutPath $TEMP
File "Installerfiles\WinZip165.exe"
DetailPrint "Starting Winzip installation"
ExecWait "/s WinZip165.exe"
Delete $TEMP\WinZip165.exe
SetOutPath $INSTDIR
Goto done
Dont_Install:
MessageBox MB_OK "You seem to have this program \
(WinZip) already installed"  
done:
SectionEnd

*note I have seen the other questions on having a silent install, this question is more WinZip specific and pertaining to how I would establish an answer file if need be.

Était-ce utile?

La solution

ExecWait "/s WinZip165.exe" is clearly wrong, it should be ExecWait '"$TEMP\WinZip165.exe" /S' but I don't think WinZip uses a NSIS based installer...

They do offer a .MSI, you might want to take a look at that. Their knowledgebase contains some useful tips like this and this. You can also find some other tips by googling...

If you have any other questions about their silent install mode you should probably contact WinZip support.

Autres conseils

Since I can't comment on Anders response because I don't have enough reputation yet, here is the command that I personally use to silently install msi installers, copied right from an installer I have used several times when I want to install multiple programs.

ExecWait '"msiexec" /i "$TEMP\MSI Installer.msi" /qn'

This is assuming that you take Anders advice and try to use the msi version of WinZip.

Also Anders mentions one of the errors in your code where you don't use a full path to the installer you are trying to run. I also wanted to note that it is always a good idea to wrap your paths in single quotes. For example when you do:

Delete $TEMP\WinZip165.exe

Add single quotes like so:

Delete '$TEMP\WinZip165.exe'

This also applies when you do your

SetOutPath '$TEMP'

and

SetOutPath '$INSTDIR'

While you can get away most cases without the single quotes, if you ever come across a path that has spaces in it, it will give you headaches if you are trying to pass the path to a macro or something because it delimits on the spaces and breaks the string into multiple pieces. It is just a good habit to get into whenever you are dealing with Windows Paths that may or may not have spaces.

BTW don't accept this answer, I intended it to just be a follow-up to what Anders had already said.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top