Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Vista requires elevated rights for installers which install drivers or other system items. Pointsec has one of these installers with the problem that the installer itself does not request elevation so the elevation must be granted to it beforehand.

When installing this software to several machines disabling UAC, installing the software and then re-enabling UAC is quite tedious. A way which would take care of UAC would be preferred.

The installer is an MSI package on a network share. The share also has the installation profile which the installer is supposed to find and use in the installation. This works fine without UAC but we have not managed to get this running with UAC.

My main problem is that when elevating the process, it seems to lose its working directory. So while a shortcut to msiexec with correct parameters and the network share as the working directory works (ie. Starts but errors due to no elevation) running this shortcut 'as administrator' complains on not finding the msi package. Process Monitor shows msiexec trying to find the package from Windows\System32. Specifying the full UNC path to the package launches the installer but it fails to find the profile file. So what is the correct way to elevate a windows installer which does not request elevation itself?

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

Basically you've got a poorly designed installer.

What you could try is setting the ALLUSERS property in the property table to 1 (using Orca, look for Orca.msi in the Windows Installer SDK) which will force a per-machine installation.

In this case the installer will then request elevation partway through the installation (this is how UAC + MSI is supposed to work) and you should be fine.

share|improve this answer
    
I was thinking Orca might provide an answer. I'll give it a try the next day I'm at the office now that I know what needs to be changed. –  Mikko Rantanen May 1 '09 at 1:07
add comment

The post Why is my starting directory ignored when I elevate a command prompt? on Raymond Chen's blog may be relevant here.

I also know that some of the elevation heuristics are very simplistic, e.g. if the file is named "setup" or "install" it will request elevation. I can't find my source for this at the moment.

Not a highly technical answer but perhaps it will be useful.

share|improve this answer
add comment

One approach would be to run an elevated command prompt, change the working directory in there and then run the installer from there. Anything launched from an elevated cmd.exe is itself elevated.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.