/build/static/layout/Breadcrumb_cap_w.png

want script

The old package does not contain a package code .Therefore i want a script that first checks if the old version is installed and if so, uninstalls the old package.
After the uninstallation is complete, the script can start the installation of the new version. can any one give me this script.

0 Comments   [ + ] Show comments

Answers (3)

Posted by: Jahnavi 14 years ago
Senior Yellow Belt
0
We can check if the product is installed or not by looking at HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall for product code of the application.
Posted by: anonymous_9363 14 years ago
Red Belt
0
Someone else who expects people to work for nothing...

Besides that, your specification is too light on detail. How far do you want the script to go when checking for installed state? Just a registry entry? Presence of the main EXE? More? Do you have a language requirement, programming-wise, or will a DOS command file suffice?

Lastly, your post belongs in the 'Scripting' forum. A moderator may well move it.
Posted by: dreyer 14 years ago
Purple Belt
0
I have no clue what this guy actually means by "old package does not have package code" but....

set objWScriptShell=CreateObject("wscript.shell")
Set Installer = CreateObject("WindowsInstaller.Installer")
InstallStatus = Installer.ProductState("{PRODUCT-CODE-HERE}")
msgbox (InstallStatus)
If InstallStatus = 5 then
objWScriptShell.Run "msiexec /x {PRODUCT-CODE-HERE} /qb-",0, True
End If
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ