Adobe Reader 7 is a very capable MSI already, so this is not about "Repackaging" but rather creating a custom deployment package for the provided MSI. This video walks you trough extracting the source files, creating an admin installation point, using InstallShield Tuner to create a custom transform and how to make use of it all in a command line deployment. Finally, it also discusses how to make use of several custom registry entries uncovered by our members in the Software Library with your custom transform.
Running Time: 9:54
This training video introduces the viewer to Windows Installer AppSearch and how it may be used. The demonstrations provided utilize Wise Package Studio covering- creating a System Search entry, showing the value of the AppSearch property in a Windows Installer Dialog, using AppSearch as a condition for a custom action and using AppSearch with LaunchCondition.
Running Time: 21:03
This training video explains transform files and walks you how to determine the contents of a transform file you may receive from a vendor or co-worker using Package Studio, AdminStudio, ORCA and a freeware tool from the Office Resource Kit.
Running Time: 10:29
Command Line Installations
Triggering unattended application installation from the command line.
The surest way to deploy an application with the least amount of issues is to use the setup routine designed for the application in the first place. Repackaging is necessary when a using a deployment tool that requires it, or when a command line installation is not supported. Often poorly documented, or not at all, you may find it difficult to discover how to go about this. You may also be surprised at the number of ways that exist to silently install an application from the command line when you know where to look and what to try. By "from the command line" we are talking about the use of command line switches to initiate the unattended installation of software such as "SETUP.EXE /SILENT". There are a number of steps you can take in your attempt to uncover a means of command line installation and we will cover them all here. As always, if you know of something over looked, shared in the comments below!
- Check Your Resources: Places To Look
- Windows Installer Setups
- Built In Command Line Support
- Troubleshooting Your Command Line Installation
It is the goal of ITNinja to be the best place to start your search for any information relating to deployment. This especially includes how to deploy various applications. In working toward this goal ITNinja offers a Software Knowledge Base. This feature of our site provides consolidated details on the deployment of specific applications. We also have a well used Q&A feature here where you can ask others for help, or just see if another visitor has already addressed your question.
Included Product Documentation
In the form of a README.TXT or other included document you may get lucky and find the information you need. Unfortunately, vendors make it difficult if not impossible to scrape together any help by very often overlooking the issue of remote deployment altogether. Still, to expend efforts trying to uncover information that may have been provided to you up front is certainly not the best use of your time. Take a look- you may be fortunate enough to have the answer right in your hands.
Many vendors now provide a knowledge base and user forums at their websites. This is an excellent source for finding silent installation information. You are unlikely to find much information in a FAQ, but there may be a knowledge base article covering the topic. The most likely place though, is the user forums or message boards where another user has come before you in search of the same information.
SMS Package Definition File (PDF)
No matter if you are using SMS or not, a Package Definition File is a great source of command line options if your software happens to include one.
PDF files are actually INI files, which may be viewed with a simple text editor such as notepad. Look for the "COMMANDLINE" entries in the file for unattended installation command lines. Many older Microsoft applications include PDF files and there have been a number of other software companies that had deployment of their applications in mind and also provided a PDF. For more information on PDF files check here.
Microsoft's new Windows Installer format is the latest answer to solving issues with installation, removal and, yes, deployment of applications. A Windows Installer based installation is currently a logo requirement for Windows 2000 (and later) compatibility. This means more and more applications are surfacing as MSI installations. You are still likely to see a "setup.exe" so don't stop looking when you see it. A program named setup.exe is still often included as a wrapper for the Windows Installer installation, which checks for the existence or for the installed version of the Windows Installer service. If it is missing or out of date, the setup.exe will install or update the service before triggering the Windows Installer installation process. Do a search of your installation media for a file with a "MSI" extension to be certain. When found your command line installation just became one of the best documented of its kind:
I recommend the following command line for the silent installation of MSI setups:
MSIEXEC.EXE /I "path and filename of MSI" /QB- /LWAMOE c:\temp\install.log ALLUSERS=1
- MSIEXEC.EXE - the MSI executable, the program that performs the actual installation of the application.
- /I - this switch informs the Windows Installer to install the specified application (as opposed to removing, reinstalling or repairing the application)
- /QB- - this switch instructs the Windows Installer to perform the installation with a basic user interface requiring no dialog boxes to be displayed. You might also use /QN to perform the installation with no user interface at all.
- /LWAMOE c:\temp\install.log - this switch instructs the Windows Installer to generate a log file at the specified path and file name (in this case, "c:\temp\install.log") and to include the following details: Non fatal errors, start up actions, out of memory or fatal exit information, out of disk space messages and all error messages. There are several other options (see the AppDeploy FAQ for more details) to include all possible details in the log file use "/L* c:\temp\install.log"
- ALLUSERS=1 - including this will cause the shortcuts for the application to be placed in "all users" instead of the current user profile.
See the Windows Installer (MSI) tag for more information.
If your installation is not a Windows Installer setup and no specific information can be uncovered regarding a means of silent installation, you may still have a very good alternative. If the setup.exe was created with an InstallSheild authoring program, a number of command line switches are supported by the setup that may help you to deploy it.
Integral is the ability to create an answer file and then use that answer file to perform the silent installation of the application. It does not always work just the way you would like, and keep in mind that the vendor may not even be aware of this ability they have provided. However, it often works just fine and should be pursued as a means of deployment before resorting to repackaging the application.
Create an answer file by launching the setup with the "/r" switch. This will take you through the normal series of dialogs to the completed installation of the application. When done, simply copy the "setup.iss" file created in your system directory (normally, c:\winnt\setup.iss) and place it in a folder along with the application's other installation files. This folder is often a copy of the installation CD on a network share, but the end result should be that you have your created setup.iss file and the application's setup.exe file in the same folder.
To kick off the silent installation of the application you may now simply specify the "/s" switch to make use of the answer file you have created. During installation there will be no prompts or indications the installation is taking place or complete. View the Windows Task Manager to see the process activity if you are interested.
You can view the setup.iss file in a simple text editor such as notepad to see what was recorded in the answer file. If serial number information was requested during installation, you will hopefully see it reflected here. This is most often the point of failure for use of an answer file such as this. If the capture of your responses does not include the serial number information, or any information for that matter, the installation may hang, fail or a pop up dialog may be presented requesting missing information. For this reason through testing should be performed (as always.)
See our full listing of InstallShield command line switches for more detail.
Nothing happens at all? If you are watching the task manager processes and do not even see your setup initiating, your call to it is in error. Make sure all files referenced are where you are specifying them to be. If you are not specifying a path, that too can be your problem. In a batch file for instance, the current directory may reset to the system directory where your installation files can no longer be found. To ensure this is not your problem, specify the entire path to all files referenced (when spaces are involved in directory or file names, be sure to include them in double quotes.)
If something goes wrong during installation, you may see the dialog with the progress bar moving in reverse. This means an error was encountered and the Windows Installer is putting everything back the way it was to avoid problems. You can easily see what the problem is by viewing the log file created by the Windows Installer (see recommended command line above with /L switch)
If you see your setup start in the Windows Task Manager (processes tab) and it remains while utilizing zero CPU cycles- you have a problem. Likely there is a dialog response not being provided by the answer file and due to the lack of a display, you cannot see where the problem lies. For more switches you can use in troubleshooting, check here.
No SETUP.ISS file is generated? First make sure you are dealing with an InstallShield setup. Some vendors have been known to wrap their setup programs in self-extracting archives. If you believe this to be the case for your situation, initiate the installation and at the first dialog prompt change windows (do not abort the installation) and browse to the TEMP directory (by default this is in your profile directory "C:\Documents and Settings\username\Local Settings\Temp" for Windows 2000 and later). Here you may find a temporary directory generated that contains the actual installation files. You may then copy the installation files from this directory elsewhere (it is removed when the setup is completed or aborted.) The copy of setup.exe found here is very likely to support the process documented above (if it is an InstallShield setup and not an MSI setup or other vendor generated setup program.)
Check the log file generated in the setup.exe directory for its [ResponseResult] section. InstallShield places one of the following return values after the ResultCode keyname:0 Success.
-1 General error.
-2 Invalid mode.
-3 Required data not found in the Setup.iss file.
-4 Not enough memory available.
-5 File does not exist.
-6 Cannot write to the response file.
-7 Unable to write to the log file.
-8 Invalid path to the InstallShield Silent response file.
-9 Not a valid list type (string or number).
-10 Data type is invalid.
-11 Unknown error during setup.
-12 Dialogs are out of order.
-51 Cannot create the specified folder.
-52 Cannot access the specified file or folder.
-53 Invalid option selected.
Still No Luck?
Perhaps there is some undocumented process you can uncover. Below are some command lines found to work for other applications in the past, try "setup.exe /?" first then go through the list below- you may get lucky!
- setup.exe /q
- setup.exe /qn
- setup.exe /silent
- setup.exe /s
- setup.exe /NoUserInput
- setup.exe /unattended
- setup.exe /CreateAnswerFile
- setup.exe /quiet
Please use our Q&A system to discuss these and other issues regarding the deployment of specific applications and deployment in general. Here the maximum number of experienced desktop engineers will have an opportunity to respond and all may benefit from it.
Bob Kelly 9/23/01, Updated for ITNinja references/links on 11/8/12
Creating a driver installation in an MSI can be a challenging task. One of the more popular methods to achieve this is to use Microsoft's Driver Installation Framework (DIFx).
Microsoft provides documentation on DIFx, however it is limited and doesn’t provide any examples.
This article provides a step by step working example of how to achieve this task. For this purpose, we are going to create a Windows XP installation for a Signed Driver: ‘Synaptics Touchpad’ with Wise Package Studio.
Step by Step - Creating a driver installation with DIFx using Wise Package Studio
1. Create a new Windows Installer (WSI) file
Work bench –> Tools–> Windows Installer Editor
If you do not get the ‘New Installation File’ window shown below, select File –> New from the main menu inside Windows Installer Editor
(by default, the last edited .WSI file will be opened).
Select Windows Application
Inside Installation Expert, complete the relevant fields under Product Details and General Information
As this will be a Driver only installation we are renaming the default Wise feature from ‘Complete’ to ‘Drivers’.
Note: If your own installation is to also contain non driver files (e.g. captured application files). Ensure there is a SEPARATE feature which will contain these.
Installation Expert –> Features
Rename the default feature from ‘Complete’ to ‘Drivers’
2. Next, we add the DIFxApp Merge Module to the ‘Drivers’ Feature
Merge Modules –> Add
Select the DIFxApp Merge Module and click Next then Finish
(if the Module is not present select ‘Download’ then ‘Wise Web Site’ to obtain it)
Note: Make sure you are using at least version 2.0 of DIFxApp Merge Module.
The DIFxApp Merge Module should then be visible.
3. Create a folder EXCLUSIVELY for driver files.
Note: If there is more than one driver (not the case with our example), there must be a SEPARATE folder for EACH driver and associated files.
Open the Filesview, then in the bottom window Right Click on ‘Program Files’ and select ‘New Folder’
For purposes of our example, we are calling the new folder 'TouchpadDriver'
Name the folder and click OK
4. Add the relevant driver files
To save experiencing a common problem (this issue will be detailed later), ensure the synpd.inf file is added FIRST. Doing this step ensures the .inf file becomes the KeyPath for the component to contain the driver files.
Highlight the ‘TouchpadDriver’ folder in the bottom left window, then select ONLY the synpd.inf file in the top window and click the Add File button.
The synpd.inf file should be visible in the bottom right window as shown below.
Next, add the remaining files to the ‘TouchpadDriver’ folder:
Check the ‘TouchpadDriver’ folder is highlighted in the bottom left window, then select the remaining files in the top right window and click the Add File button.
Tip: Some drivers have several different folders containing the relevant files. If this appears to be the case, check the entries of the .inf file to see if there are references to files in a subfolder(s).
If so, you may need to modify the file path entries in the .inf file, to allow all the files to be in ONE root folder.
All files for a specific driver need to be in one root folder along with the .inf file for a successful installation via DifX.
5. Configure Driver Installation Options
Double click on the synpd.inf file in the bottom right window to set driver options.
Installation Expert –> Files –> synpd.inf
Select the Driver tab
What to do if there is no Driver tab
Note: If the Driver tab IS present, skip to the next section: ‘Configure Driver Installation Options (Continued)’
This is a common problem with a relatively straight forward solution.
Open Setup Editor from the bottom of your screen and select the Components tab at the top of the left window.
Expand out each component in the left window and look in the relevant Files section until you find the synpd.inf file.
In our example below, the component containing the .inf file is called synpd.inf. We can see that there is a small yellow key icon beside the in the synpd.inf file in top of the right window.
This means that the file is the KEYPATH for the component it is in.
Setup Editor –> Components
If the yellow key is NOT present beside the .inf file then it needs to be enabled:
Right Click on the synpd.inf file and click Set as Key
Note: If you are familiar with using the MSI Tables, the same as above can be achieved there: Reference synpd.inf in the File table to find the relevant component name.
Then, edit the KeyPath of the matching entry in the Component table.
Configure Driver Installation Options (Continued)
Under the Driver tab, ensure the ‘Use DIFxApp to install this driver file’ option is enabled.
Enable the DIFxApp Installation Options to meet your preferences (these are described below).
DIFxApp Installation Options
Retain better-matching Pnp function drivers
Enabling this option will keep an existing Plug and Play driver on the computer if it is seen to be a better match (“better match” means if there is a signed and/or newer driver already on the computer this will be retained and the driver in this installation will not be installed).
If you clear this checkbox, the installation's driver will be installed and over-ride any existing driver on the computer.
Prompt for missing device
Enabling this option gives a prompt and the end of the installation. This will occur if the matching device to the driver is NOT connected to the computer.
Note: Even if this option is enabled, the prompt will NOT appear under a silent install.
Create entry under Add/Remove Programs
This will add an entry under Add/Remove Programs for the driver(s) installed in ADDITION to the standard entry for the MSI installed.
Configure the above DIFxApp Installation Options to your preferences then click OK to confirm.
OS Specific Launch Condition
Once all the steps above have been completed, consider what version of OS the driver is intended for. An ‘accidental’ rollout of out a Windows XP Driver Package to a Windows 2000 PC may not give very desirable results!
The best safeguard is to condition the installation so it will only install on the intended OS.
This can be achieved through setting System Requirements.
Under Installation Expert in the left window select System Requirements.
The relevant options to configure are Windows Version and Windows NT Version. These are shown highlighted in the right window below. Double click to edit them.
In the case of our example our driver is intended for Windows XP, so we have set Windows Version (i.e. Windows 95, Windows 98 etc) to ‘Not supported’.
Also the Windows NT Version has been set to ‘Windows XP’.
The Message Text field defines the actual message to display if the OS Condition is NOT met.
Installation Expert –> System Requirements
Once this has been completed, compile your MSI and the Driver Package is ready to go!
Behind the Scenes - What's happening in the MSI Tables
The key table involved for a driver installation using DifX is the MsiDriverPackages table. The use of each column is as follows:
Should have the name of the component containing the .inf file for the driver.
A number which defines the type of driver to be installed, (Signed or Unsigned) along with the specific Installation Options.
Controls then install order of drivers (if there is more than one driver, lowest number installs first).
Setup Editor –> Tables –> MsiDriverPackages
The following are common examples of values for the Flags column:
Signed Driver Installation
7 = Signed driver install (Standard install with no options configured)
6 = Signed driver install + “Retain better-matching PnP function drivers”
5 = Signed driver install + “Prompt for missing device”
3 = Signed driver install + “Create entry under Add/Remove Programs”
Unsigned Driver Installation
8 = Unsigned driver install (Standard install with no options configured)
14 = Unsigned driver install + “Retain better-matching PnP function drivers”
13 = Unsigned driver install + “Prompt for missing device”
11 = Unsigned driver install + “Create entry under Add/Remove Programs”
Note: Officially, the valid range that can be used in the Flags column is a number between 0 – 7.
Because unsigned driver installations are ‘unsupported’ by Microsoft, the range for unsigned driver installations is 8 and above. Any of these options will show up as a table error (in addition it will appear as an ICE error if a validation is run). This is normal.
Tip: For an unsigned driver installation you won’t be able to set the options via the interface in Wise (using the Driver tab of the .INF file). You will need to go into the MsiDriverPackages table and set the Flags value directly.