Install/Uninstall Scripts for Installing/Uninstalling Packages
Though we package applications using the following methods,
1. Setup Capture method to produce MSI file
2. TRANSFORM method creation to produce MST file
3. Silent response methods to produce ISS file etc...
We still need an install script that will install the package in the commandline. We often use BATCH files and VBScript files. For VBScript install scripts my friend ESHWAR has written an excellent article:
Installation Wrapper [vbscript] with Reboot Timeout for Software Delivery
I'm going to use command files [Install.cmd/Uninstall.cmd] for my day-to-day packaging and deployment in windows7x64 environment. Following is the default template that I use in my current project and I hope this can be useful for most of you who have not implemented or about to implement standards around install scripts.
Requirements:
1. The application should be installed in near silent or silent mode
2. standard LOG file should be generated under C:\SWDLogs folder
3. Exit codes 0, 1641 & 3010 means success and everything else is failure
Install.cmd
Exit %insterror%
=======================================================================================
Uninstall.cmd
=======================================================================================
Exit %uninsterror%
Some useful Naming Conventions:
Naming conventions plays a major role in standardizing the processes. We have the following naming conventions:
In case of Setup Capture MSI name should be as follows:
PKGID-Vendor-ApplicationName-Version-ReleaseVersion.MSI
In case of Transform creation method, MSI name should not be modified. However the TRANSFORM name should be as follows:
PKGID-Vendor-ApplicationName-Version-ReleaseVersion.MST
PKGID is a unique identifier for each package. Release Version starts from 1.0 and incremented when the package is reworked. This will ensure the tracking of how many times the package has been reworked.
I hope this information helps somebody. Thank you.
Comments 9 Comments • Jump to latest comment
do you have more scripts?
Cheers,
Param
i have a lot of packaging scripts. will try to upload whenever I can.
Thanks,
CableGuy
Do not forget to mark a SOLUTION
C:\Program Files\InstallShield Installation Information\{4D9CA1B8-5FF5-47A7-8BDF-C37D1F9F55A5}\setup.exe" -l0x9 -removeonly -uninst /s /f1"c:\temp\uninst_setup.iss" /f2"c:\temp\setuppec.log
I can uninstall the string manually if I copy the uninst_setup.iss file to c:\temp then ran the above string in cmd.
I just need help on creating a wrapper to uninstall it on one shot through SCCM.
Thanks
You can create a simple VBscript that does this job. However location of the ISS file is very important. If it is under user's desktop folder then folder path in windows 7 will be C:\Users\<UserName>\Desktop. If the user file is under all user's desktop folder then the path will be C:\Users\Public\desktop.
Please note that SCCM will not have access to the user's profile as the software deployment will be carried out under SYSTEM account. So please let us know the Operating system and file path so that I can share you the script.
Thanks,
CableGuy
Do not forget to mark a SOLUTION
Thanks. the folder path will be C:\Users\<UserName>\Desktop\Install
If you can please share the script for both Windows 7 and windows XP
thanks
useful script.
Thanks a lot for sharing script...
Thank& Regards,
Ambesh
Please mark your thread as 'SOLVED' with the answer that helps you.
Hello,
firstly, I would like to thank you for sharing your script.
Would your script also work for .exe?
thanks
You can repleace the following line with your EXE install/uninstall command:
msiexec.exe /x {A5D4DE6F-62F0-46B8-82AF-174FFC021157} /qb-! /l*v %LogFolder%
Example:
"%~dp0Setup.exe" -silent
Thanks,
CableGuy
Do not forget to mark a SOLUTION
Would you like to reply?
Login or Register to post your comment.