- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Creating an MSI issue
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Creating an MSI issue
I am new to InstallShield and I am sure this has been answered somewhere in the Forum. I just can find the answer.
I have a a software package set up, with multiple folders and installs, with a script (Install.cmd) to launch these items in order. So all the user has to do is click on Install.cmd and sit back and watch everything install.
Now I they want this in an .msi.
I am using Basic MSI Project.
I have gone through the project Assistant and set up added where I want this to be set up (c:\CompanyName\software) and copied the files and folder's in, but when run the .msi it just copies the software folder to the location but does not execute the Install.cmd
I have even tried to use the Custom Actions wizard to try and get this to run the install.cmd, with no luck.
Here are the instructions I have followed for the custom actions:
- Make sure that the installer is configured to install the batch file to the main installation directory location (i.e., the location stored in the INSTALLDIR MSI property)
- Launch the Custom Action Wizard. For more information, see the "Additional Information" section of this article.
- On the "Basic Information" dialog, enter a name (i.e., test) for the custom action in the Name field.
- Click the Next button.
- On the "Action Type" dialog, set the "Type" to "Launch an executable" and the "Location" to "Stored in the Directory Table".
- Click the Next button.
- On the "Action Parameters" dialog, set the "Source" to "SystemFolder" and the "Target" to the following:
"[SystemFolder]cmd.exe" /c "[INSTALLDIR]NameOfBatchFile.bat"
This command calls cmd.exe (the executable for the Windows command prompt) from the location stored in the SystemFolder MSI property and passes cmd.exe the path to the batch file. Cmd.exe accepts various parameters. For example, to have the command prompt window close after launching the batch file, use the /c parameter, as in the example above. To have the command prompt window remain open after launching the batch file, use the /k parameter instead. For more information regarding the parameters accepted by cmd.exe, see the "Additional Information" section of this article.
- Click the Next button.
- On the "Additional Options" dialog, keep the default values selected.
- Click the Next button.
- On the "Respond Options" dialog, keep the default values selected.
- Click the Next button.
- On the "Insert into Sequence" dialog, set the "Install Execute Sequence" to "After InstallFinalize" and the "Install Execute Condition" to the following: Not Installed and VersionNT. This condition instructs the install to only execute the custom action during a first-time install on an NT-based target system.
I think with the Custom Actions, the issue is my "INSTALLDIR" shows "c:\CompanyName\Software" and when I put in (from line 7 of instructions) "[SystemFolder]cmd.exe" /c "[INSTALLDIR]Insatll.cmd" it can't find the file, even though it shows to be in there.
I know this is long but I just need to have this MSI execute the Install.cmd, have the option to have it run silently.
Any help would be great!
Thanks in advance.