This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Set install to remove old install
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 18, 2011
01:23 PM
Set install to remove old install
This is something I have never been able to get my head around.
I have an IS2011 Basic MSI project.
My QA dept does not want to have to uninstall every day, new build daily, Builds are automated using VS2010 and a Deployment sln file.(TFS builds the sln) What do i need to do in the ism and/or build process so taht when a new msi is run, by double clicking the msi file, so that it will uninstall the current version then install the new version?
I have an IS2011 Basic MSI project.
My QA dept does not want to have to uninstall every day, new build daily, Builds are automated using VS2010 and a Deployment sln file.(TFS builds the sln) What do i need to do in the ism and/or build process so taht when a new msi is run, by double clicking the msi file, so that it will uninstall the current version then install the new version?
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 24, 2011
09:58 AM
How about making each daily build as Major Upgrade?
Schedule RemoveExistingProducts action between the InstallValidate action and the InstallInitialize action. In this case, the installer removes the old applications entirely before installing the new applications.
And make TFS team build generate new ProductCode for msi for every build.
Schedule RemoveExistingProducts action between the InstallValidate action and the InstallInitialize action. In this case, the installer removes the old applications entirely before installing the new applications.
And make TFS team build generate new ProductCode for msi for every build.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 24, 2011
01:37 PM
When creating a major upgrade that forces a complete uninstall, you have to change the product code AND the product version. Also, remember that the product version has to be a significant change, meaning the first three digits; ie: A.B.C.D (either A,B or C have to change).
I have run into these more than once. What you will find when you just change the Product Version is two entries in the Add/Remove Programs in the Control Panel.
We have many Engineering builds and run into this issue all the time. I'm looking now for a solution to ALWAYS uninstall the product no matter what solution as we speak. If I find it, I'll come back here and post the solution.
For definitions see http://kb.flexerasoftware.com/doc/Helpnet/installshield12helplib/MajorMinorSmall.htm
-Kevin
I have run into these more than once. What you will find when you just change the Product Version is two entries in the Add/Remove Programs in the Control Panel.
We have many Engineering builds and run into this issue all the time. I'm looking now for a solution to ALWAYS uninstall the product no matter what solution as we speak. If I find it, I'll come back here and post the solution.
For definitions see http://kb.flexerasoftware.com/doc/Helpnet/installshield12helplib/MajorMinorSmall.htm
-Kevin
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 25, 2011
08:13 AM
You might want to have the QA department consider using VMware or something similar. They could save snapshots that represent what end users' environments look like, and then install new builds on those images. When a new build is ready, they simply revert to the original snapshot and then run the new build.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 29, 2011
11:05 AM
Another possibility is to write a C# application "Auto_Uninstaller.exe" that automatically removes specified applications. You could invoke Auto_Uninstaller.exe before installing your new, fresh build.
The code would look something like this:
[CODE]private void Uninstall_All_Apps()
{
// ====================================
// *** UNINSTALL ALL BASIC MSI APPS ***
// ====================================
// Declare and fill a string array with the names of the apps
// that were installed via basic msi.
// *** NOT for InstallScript msi apps! -- fails, and breaks them!
string[] BasicMSIproductInstalls = new string[]
{ "My Product Name 1",
"My Product Name 2",
"etc."
};
// loop through and delete the applications
foreach (string app in BasicMSIproductInstalls)
{
// Create the uninstall process.
Process proc = new Process();
proc.StartInfo.FileName = "msiexec.exe";
proc.StartInfo.Arguments = "/uninstall" + " " + app + " " + "/qb";
// Start the process.
proc.Start();
// Wait
proc.WaitForInputIdle();
proc.WaitForExit();
// Release resources.
proc.Close();
}
}
[/CODE]
You could modify this to load the application String array with names from a *.txt file, which would change as apps are added or deleted. Read the *.txt file from a known network location.
The code would look something like this:
[CODE]private void Uninstall_All_Apps()
{
// ====================================
// *** UNINSTALL ALL BASIC MSI APPS ***
// ====================================
// Declare and fill a string array with the names of the apps
// that were installed via basic msi.
// *** NOT for InstallScript msi apps! -- fails, and breaks them!
string[] BasicMSIproductInstalls = new string[]
{ "My Product Name 1",
"My Product Name 2",
"etc."
};
// loop through and delete the applications
foreach (string app in BasicMSIproductInstalls)
{
// Create the uninstall process.
Process proc = new Process();
proc.StartInfo.FileName = "msiexec.exe";
proc.StartInfo.Arguments = "/uninstall" + " " + app + " " + "/qb";
// Start the process.
proc.Start();
// Wait
proc.WaitForInputIdle();
proc.WaitForExit();
// Release resources.
proc.Close();
}
}
[/CODE]
You could modify this to load the application String array with names from a *.txt file, which would change as apps are added or deleted. Read the *.txt file from a known network location.