I seem to run into these setup package configuration nuances often. It is probably because I keep moving along projects from version to version of VS.NET (now mostly working with VS.NET 2010) and servers keep changing versions too (i.e. 2008 R2). Recently I was having issue installing a .msi package On Windows Server 2008 R2, stating: "You do not have sufficient privileges to complete the installation for all users of the machine. Log on as administrator and then retry the installation." The typical workaround for this was to use the generated "Setup.exe" file instead for installation and right-click it to select "Run as Administrator". However, .msi Windows Installer packages do not have this option to directly run as an Administrator. I did find a work around for installing .msi packages on Server 2008 R2 here
However the problem I ran into before finding the work around was that my "Release" folder for my setup package project was only generating the .msi setup package and not the Setup.exe as well. This was strange to me as all of my other projects contained the Setup.exe package alongside the generated .msi package.
I figured out the reasoning why the Setup.exe package is (or is not) generated. It has to do with selecting the option in the setup project's properties to create a "Prerequisites" setup package as well. Selecting this option (I believe it is selected by default when adding a new setup and deployment project to your solution) is what triggers the creation of the Setup.exe package.
Here where the steps I took to find this option and have the Setup.exe package generated. 1st, select the setup project's "Properties" link after highlighting the setup project in Solution Explorer within VS.NET as displayed below:
2nd, take note of the "Configuration" dropdown value. In my case things were really messed up as I had the proper selections for "Debug" and it was "Release" mode that was incorrectly configured. Check both to make sure you have it correct.
3rd, press the "Prerequisites..." button displayed above in the property pages.
Lastly, check the box stating "Create setup program to install prerequisite components" as displayed below:
Take note of selecting the appropriate .NET Framework version or any other required prerequisites, and select "OK" and the "OK" again to close the dialog box. Rebuild the setup package and then navigate to its build directory (or use "Open Folder in Windows Explorer" feature by right-clicking project in VS.NET 2010: pictured below) to verify the Setup.exe package has indeed now been created.
Post a Comment