Hi Friends,

If anyone have documentation for MSI Scripting please provide to me. Thank you.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Do you mean writing custom actions...?

There is good general information here:

(http://msdn.microsoft.com/library/en-us/msi/setup/windows_installer_guide.asp)
Answered 06/22/2005 by: MSI_repackager
Orange Belt

Please log in to comment
0
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.
Answered 06/22/2005 by: Sathia
Senior Yellow Belt

Please log in to comment
0
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.
Answered 06/22/2005 by: TomB
Orange Belt

Please log in to comment
4
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
Answered 06/23/2005 by: VikingLoki
Second Degree Brown Belt

Please log in to comment
0
Yes... I like your idea better. [:D]
Answered 06/23/2005 by: TomB
Orange Belt

Please log in to comment
0
Hi Tomb, Vikingloki,

Thanks for helping me with the valuable info.

I am working on it, I post you the out come.

Perhaps,
Tomb i am using Unicentre Software Delivery to deploy apps.

Thnks.
Answered 06/23/2005 by: Sathia
Senior Yellow Belt

Please log in to comment
0
Nice one VikingLoki....I rated that tops mate. Good advice.
Answered 06/24/2005 by: MSIMaker
Second Degree Black Belt

Please log in to comment
0
Hi Guys,

Thanks for your helpfull information.

Eventually this can be applied for one application's msi. But in my case a application is installed using 3 msi's using diff GUID's, and upgrade codes. But my new msi contains all in one.

This is the problem i am facing now even in upgrading also.
Answered 07/08/2005 by: Sathia
Senior Yellow Belt

Please log in to comment
0
The Upgrade table can contain several upgrade codes to uninstall multiple MSIs. The upgrade table would handle this well however in a corporate environment I believe this could of uninstallation would be better handled in the deployment tool.
Answered 07/09/2005 by: DavidLock
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity