I am running Windows 7 as a user with Administrator privileges, but I need an answer that works for Vista as well..
I'm trying to work out how to configure our product so that it can be installed from its .msi file, from a network location, with User Access Control turned on. The installer needs Admin privileges in order to run regasm and NGen.
The setup.exe command has no problems. We've set the Required Execution Level to Administrator, and it works fine. However, if we either double-click the .msi file, or open a cmd window to run it via msiexec, it asks for permission to run as Admin, but doesn't run the regasm and Ngen commands that are in the InstallScript, the .tlb files we need aren't created, and the assemblies aren't registered in the GAC.
We can't run a cmd window as Administrator, as we can't then access the network drive that holds the .msi file. We can copy the .msi to a local drive, but that's impractical when our customers could be installing automatically on dozens if not hundreds of machines at once.
This thread on the Flexera forums suggests that only part of the installation process runs with elevated privileges. Can I get my InstallScript to run in that section, and if so, how?