Jump to content

Recommended Posts

Posted

I am trying to create a software deployment for .exe files which can be installed silently via a vbs script.

I have been working all weekend to get a working file, however, I'm not having any luck.

 

Please can someone help?

Posted

depends on what exe some play nice with silent installs some don't. For example heres a simple .bat one for tuxpaint it just checks if tuxpaint.exe exists in ptogram files/program files x86 if it does it exits if it doesn't it runs the installer with the /silent switch that works for that exe. Other possible switches are /quiet /veryquiet /q /s and those are just the ones off the top of my head you can sometimes find out by running the installed with /? but that often isn't helpful and all you can do is google/guess

 @[u][url="http://www.edugeek.net/member.php?u=16971"]echo[/url][/u] OFF
REM --- Check for an existing installation of Tux Paint
if exist "C:\Program Files\TuxPaint\tuxpaint.exe" goto _End
if exist "c:\Program Files (x86)\TuxPaint\tuxpaint.exe" goto _End
REM --- Deploy to Windows 2000/XP/2003
"[url="file://\\server\packages$\tux\tuxpaint-0.9.21c-win32-installer.exe"]\\server\packages$\tux\tuxpaint-0.9.21c-win32-installer.exe[/url]" /Silent
REM --- End of the script
:_End

Posted
depends on what exe some play nice with silent installs some don't. For example heres a simple .bat one for tuxpaint it just checks if tuxpaint.exe exists in ptogram files/program files x86 if it does it exits if it doesn't it runs the installer with the /silent switch that works for that exe. Other possible switches are /quiet /veryquiet /q /s and those are just the ones off the top of my head you can sometimes find out by running the installed with /? but that often isn't helpful and all you can do is google/guess

 @[u][url="http://www.edugeek.net/member.php?u=16971"]echo[/url][/u] OFF
REM --- Check for an existing installation of Tux Paint
if exist "C:\Program Files\TuxPaint\tuxpaint.exe" goto _End
if exist "c:\Program Files (x86)\TuxPaint\tuxpaint.exe" goto _End
REM --- Deploy to Windows 2000/XP/2003
"[url="file://\\server\packages$\tux\tuxpaint-0.9.21c-win32-installer.exe"]\\server\packages$\tux\tuxpaint-0.9.21c-win32-installer.exe[/url]" /Silent
REM --- End of the script
:_End

 

This is the way I would do it - can also use PSTools to push for installation out to target machines if needed or wrap in a logon/startup script.

Posted

I did find this a while ago - not sure if its of any help (sorry its a bit of a info dump!):

 

 

Making Basic MSI Silent Installs

 

With a Basic MSI project, you typically do not need to modify the project itself to create a silent installation. You supply data such as serial numbers and installation directories to the MSI package through msiexec.exe parameters. First, you should find a list of applicable parameters. Run through a complete install while logging the properties being modified. Start the process by issuing one of the following commands:

 

For EXE files:

setup.exe /v"/Lp properties.log"

 

For MSI files:

msiexec /i myinstaller.msi /Lp properties.log

 

When that is finished, there will be a properties.log file in the directory where the installer is stored. This file will list all of the properties where you will find the values you entered. (if you entered a CD Key of 1122334455, you may see a line like this: “Property: SERIALNUMBER=1122334455”). You now know that the property named “SERIALNUMBER” stores the value for your CD Key. After discovering the parameter names, you can supply them to the installer using one of the methods listed below:

 

1: Supply arguments to msiexec.exe through the setup.exe command from a command prompt (setup.exe /s /v”/qn SERIALNUMBER=1122334455”). The /s executes the install silently while the /v”” passes any options in the quotes directly to the msiecxec.exe executable.

 

2: Supply arguments directly to msiexec.exe (msiexec /qn /i myinstaller.msi SERIALNUMBER=1122334455). The /qn runs the install silently.

 

3: Supply arguments to msiexec.exe through the Setup.ini file. This is useful when many parameters are needed and command line length limitations become a problem. Open the Setup.ini file, and find the “CmdLine=” key. Just directly type your msiexec.exe arguments here (CmdLine=/qn SERIALNUMBER=1122334455 INSTALLDIR=”C:\My Install Dir”). Once the parameters are in, run “setup.exe /s” to install silently

 

None of the options above will require modification of the InstallShield project, however, lets assume that you have a 3rd party application designed to “Upgrade” a database during the install. You may need to control that program as well. First, you should make the program itself accept command line parameters (or research the documentation for the 3rd party app to discover existing parameters). Once the 3rd party app is able to be controlled by command line parameters, you can pass parameters to the app from msiexec.exe. In InstallShield, create a new PUBLIC property (Public properties are simply all uppercase property names). This can be done in the “Property Manager”, and we’ll name ours “MYARGUMENTS”. Next, in the custom actions section, select the action that launches your 3rd party app, and fill in the “Command Line” field with “[MYARGUMENTS]”. Now, any arguments passed to the installer can be sent to the 3rd party app. (setup.exe /s /v”/qn SERIALNUMBER=1122334455 MYARGUMENTS=/U” - this would pass /U to the application specified in your custom action that you recently modified with [MYARGUMENTS]).

 

NOTE: Silent installs will completely skip the UI sequence. If you are using custom actions, make sure they are being called in the execute sequence.

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...