MSI Script
Hi Friends,
If anyone have documentation for MSI Scripting please provide to me. Thank you.
If anyone have documentation for MSI Scripting please provide to me. Thank you.
0 Comments
[ + ] Show comments
Answers (9)
Please log in to answer
Posted by:
VikingLoki
19 years ago
No, no, no. MSIEXEC, VB Script, SMS... That's the hard way to do it. Use the Upgrade table!!!
Add the upgrade code of App A & App B to the upgrade section of App C. App C will look for A & B and will remove them before installing. Even though I normally handle removals with my distribution system for tracking purposes, I do this all the time to insure old versions are removed if something falls through the cracks. If you are using Wise or InstallShield, open the App C MSI, go to the Upgrades section and indicate the MSI's you want removed before installation. The editors take care of the rest. It's VERY easy. (This process is also known as a "Major Upgrade" in the Windows Installer documentation)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/upgrade_table.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/updating_upgrade_table_for_an_upgrade.asp
Add the upgrade code of App A & App B to the upgrade section of App C. App C will look for A & B and will remove them before installing. Even though I normally handle removals with my distribution system for tracking purposes, I do this all the time to insure old versions are removed if something falls through the cracks. If you are using Wise or InstallShield, open the App C MSI, go to the Upgrades section and indicate the MSI's you want removed before installation. The editors take care of the rest. It's VERY easy. (This process is also known as a "Major Upgrade" in the Windows Installer documentation)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/upgrade_table.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/updating_upgrade_table_for_an_upgrade.asp
Posted by:
MSI_repackager
19 years ago
Posted by:
Sathia
19 years ago
Thanks for your valuable info.
Actually i wet through this before.
I need to know how we can uninstall 2 installed application by installing a new msi..
ie.
A- Application is already installed using MSI
B- Application is already installed using different MSI.
C- New application going to install using MSI.
Now I need to uninstall A&B before installing C.
we can write a command line to unistall both seprately but A & B was deployed from different Server (X). I am going to deploy C from a different server(Y).
A & B cannot communicate Y, C cannot communicate X servers.
So I need to write a custom action to unistall A&B from X server and C to be installed from Y Server in a Single Deployment for few hundred PC's.
Any one can assist on this issue it will be great for me to settle the issue.
Thanks in advance.
Actually i wet through this before.
I need to know how we can uninstall 2 installed application by installing a new msi..
ie.
A- Application is already installed using MSI
B- Application is already installed using different MSI.
C- New application going to install using MSI.
Now I need to uninstall A&B before installing C.
we can write a command line to unistall both seprately but A & B was deployed from different Server (X). I am going to deploy C from a different server(Y).
A & B cannot communicate Y, C cannot communicate X servers.
So I need to write a custom action to unistall A&B from X server and C to be installed from Y Server in a Single Deployment for few hundred PC's.
Any one can assist on this issue it will be great for me to settle the issue.
Thanks in advance.
Posted by:
TomB
19 years ago
To uninstall applications A and B you will not need to know the server they were installed from. You can find the Product Code for applications A and B. Then run the command:
msiexec /x {GUID}
The {GUID} would be the Product Code for the installed applications.
To find the Product Code you can use tthe free tool ORCA available from the MSI SDK (can get from Microsoft).
Once you have ORCA, right click on the MSI and choose edit with ORCA and go to the Property Table. Look for Product Code, this will be what you put on the command line.
If I understand correctly however it sounds as if you are looking to install an MSI and during that install remove applicaitons A and B.
The catch is that you can not launch another msiexec process during the InstallExecuteSequence table. So you will not be able to create a CA to run the Msiexec.exe and put it in the InstallExecuteSequence table.
Using Nested MSI, I do belvie that you can only uninstall an MSI if it was nested during the origional install.
The easiest solution might be to look at how you are deploying your applicaitons.
What is your deployment tool?
Can you have your deployment application run a vbscript or cmd file that can call the uninstall of applications A and B then install C? For example, in SMS you can create a SMS exe to run the 3 external commands and then deploy that exe.
msiexec /x {GUID}
The {GUID} would be the Product Code for the installed applications.
To find the Product Code you can use tthe free tool ORCA available from the MSI SDK (can get from Microsoft).
Once you have ORCA, right click on the MSI and choose edit with ORCA and go to the Property Table. Look for Product Code, this will be what you put on the command line.
If I understand correctly however it sounds as if you are looking to install an MSI and during that install remove applicaitons A and B.
The catch is that you can not launch another msiexec process during the InstallExecuteSequence table. So you will not be able to create a CA to run the Msiexec.exe and put it in the InstallExecuteSequence table.
Using Nested MSI, I do belvie that you can only uninstall an MSI if it was nested during the origional install.
The easiest solution might be to look at how you are deploying your applicaitons.
What is your deployment tool?
Can you have your deployment application run a vbscript or cmd file that can call the uninstall of applications A and B then install C? For example, in SMS you can create a SMS exe to run the 3 external commands and then deploy that exe.
Posted by:
Sathia
19 years ago
Posted by:
Sathia
19 years ago
Posted by:
DavidLock
19 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.