Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual Studio Installer => Overwrite on Installation

Status
Not open for further replies.

briglass

Programmer
Dec 4, 2001
179
GB
My users may or may not be installing my new version of the software over an old version of the software.

Right now, the Visual Studio installation will not overwrite any of the old files, and it does not prompt the user.

Is there a quick qay to tell Visual Studio to go ahead and overwrite any and every duplicate file it comes across?

Thanks!

Brian G.
 
Normal installs should overwrite - if you are installing a later version. Make sure you are incrementing the version number when you compile. If the version number stays the same, the installation won't overwrite.

When you click on File - Make exe, click the Options button. You can change the version manually, or have it auto-increment on each compile. I suggest the latter.
 
I found that the reason the Installer doesn't seem to overwrite files is because the .MSI file itself is cached on the target machine and according to Microsoft the only way to ensure that your changes are incorporated into the product installation, you must uninstall any older version of the .MSI file before you run the newer version. Their recommendation is as follows:

--------------------------------------------------------
To run an installer package file from Windows Explorer

Before starting this procedure, make sure you have built the installer project (.wip) file into an installer package (.msi) file.

In Windows Explorer, navigate to the installer package (.msi) file you want to run.


If this is a changed installer, right-click the .msi file name and then select Uninstall from the context menu. Follow the prompts to complete the uninstall procedure.


After the uninstallation is complete, right-click the .msi file name in Windows Explorer again.


Select the context menu option corresponding to the installation type:
Select Install for an installation to a local drive.
–or–

Select Install to Network for a network installation to a server.
Follow the prompts to complete the installation.

------------------------------------------------------

In my case, however, I wanted to perform the installation via another VB program. So what I did was to shell out to the installer program requesting the uninstall and then shell out to it again requesting the install.

To perform the uninstall:
"C:\WINDOWS\System32\msiexec.exe" /x "name of MSI file"

To perform the install:
"C:\WINDOWS\System32\msiexec.exe" /i "name of MSI file"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top