Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio MSI Installers

I have an Web Setup Project Installer and I would like to default the site and the Application Pool that is selected during the install process. Also I would like to have the name of the product append the current version number during the build process of the installer.

Any help would be greatly appreciated! Thank you

like image 370
Nic Avatar asked Dec 05 '09 15:12

Nic


People also ask

What is MSI installer vs installer?

The Windows Installer is a component of Windows that handles the installation, maintenance, and removal of software. .MSI files are Windows Installer database files and interact exclusively with the Windows Installer, unlike .

How do I create an MSI installer in Visual Studio?

Go to Extensions > Manage Extensions > Online > Search, find, download and install Microsoft Visual Studio Installer Projects extension. 2). Add a new Setup Project in your solution > right-click Application Folder > Add > Project Output… > choose the corresponding Project > select Primary output > OK.

Where do I find MSI installer?

msi file is stored in the Windows Installer cache. Every update to the product such as a hotfix, a cumulative update, or a service pack setup, also stores the relevant . msp or . msi file in the Windows Installer cache.

How do I download an MSI installer?

MSI files are natively executable on Windows, so you can run any MSI file on Windows to install the program without a third-party app or extension. Double-click the file to run it. This will start the installation wizard, and start installing the program. If you're prompted, click Run in the confirmation pop-up.


1 Answers

The Visual Studio Web Setup Project is quite a simple (and not too flexible) tool. You have some options, though (assuming you are not ready to switch to using something more flexible such as WiX or a commercial installation packaging product).

Modify the MSI After Building

One way to do what you want is to modify the MSI file after it has been built.

You can add properties such as the following:

  1. Add a property named TARGETSITE and set it to the metabase path of the site you need to be the default. For example, /LM/W3SVC/2.

  2. Add a property named TARGETAPPPOOL and set it to the name of the application pool you need to be the default. For example, MyAppPool.

  3. You can also set the product name by editing the existing ProductName property.

Making changes to MSI files can be achieved manually with tools such as InstEdit or ORCA (which is part of the Windows SDK).

Alternatively, you can create/find MSBuild tasks to get and set properties in MSI files. This gives you a nice way to automatically make the desired changes during automated builds.

Invoke with Commandline Arguments

More simply, you can invoke the installation from the command-line using msiexec.exe and specifying values for the TARGETSITE and TARGETAPPPOOL properties, for example:

msiexec /i MySetup.msi TARGETSITE=/LM/W3SVC/2 TARGETAPPPOOL=Pool2

You can't mess about with the ProductName this way, though.

like image 200
Dave Cluderay Avatar answered Sep 17 '22 08:09

Dave Cluderay