Install With Elevated Privileges Xp

Posted on

Elevate MSI install while allowing user based actions. And I run my MSI elevation code (Below), the package installs but the current user actions are performed on the user I elevated the installer with. Start exe after msi install but using current user privileges. 0.NET 2.0 Process Elevation for App Installation. I Enabled 'Allways install with elevated priviledges' policy object in both User and Computer Configuration/Administrative Template/Desktop path of group policy to be.

Windows 7 Installing fonts and Administrator Privileges I am trying to instal a font into Windows 7 for use with Office 2010. I've followed the instructions for Install font in Windows 7 from the Microsoft Website. How do I elevate my installer exe with admin privileges? Post by vssinc » Fri Aug 13, 2010 7:39 pm. I need to give the install exe elevated administrator privileges when initially loading. If the user’s windows has UAC mode enabled under Vista and Windows 7, the install fails because these privileges are not set. How do I run a.msi installer with elevated priviledges on Windows. Or use the GPO setting 'Always Install with Elevated Privileges' in Admin Templates/Windows.

Active6 years ago
Install with elevated privileges xpath

Yes, there are many articles related to elevating permissions when installing MSI packages. I have a twist on the issue that I can't find a good answer to. If I'm logged in as a user and I run my MSI elevation code (Below), the package installs but the current user actions are performed on the user I elevated the installer with.
For example, if the MSI adds a file to the CURRENT USER's desktop. The result of elevation (running as 'Joe Admin') is the file gets put on Joe Admin's desktop -not the currently logged in user ('Sally User'). I have owned software that Elevates as Joe but puts the file on Sally's desktop as if she installed it. -I'd like to write my own. This is on a Windows 7 Machine, UAC is turned off.

Here is the non-working code. (Sally is logged in, Elevate as Joe -File goes to Joe's Desktop) (LoadUserProfile property was an attempt to solve this issue -didn't work).

Fred B
Fred BFred B

2 Answers

From an elevated process call msiexec /jm foo.msi to perform an advertisement. This blesses the package. From a standard user process call msiexec /I foo.msi REBOOT=R /qb and this will start the installation off as the user but elevate seamlessly as needed. Standard Actions and Custom Actions with No Impersonation will run as SYSTEM and Custom Actions with Impeornation will run as the user without privs as designed.

Christopher PainterChristopher Painter
49k6 gold badges53 silver badges90 bronze badges

With Help from Christopher Painter, this appears to be the answer (THANKS CHRISTOPHER!!!)I've read the words 'advertise' before and always assumed it had something to do with 'publishing in GPO' so I never follwoed through. Seems I'm wrong. Here's the trick should anyone else run across this.

First, advertise with elevated rights to 'bless' the msi for end user installation. In my mind an adminstrator is saying, sure this msi is safe for Sally end user to install:

Then, install as the end user as if they are admin:

My code (surely could be better):

Fred BFred B

Not the answer you're looking for? Browse other questions tagged c#processwindows-installeruser-profileelevation or ask your own question.

How to Always Install with Elevated Privileges

If you do not want to choose Run As Administrator before you install a program then you can use this tweak. It will enable Always Install with Elevated Privileges on your account.

Require Elevated Privileges

Running Windows 10? Use our Registry Editor!

Are you currently running Windows 10? Then why not use 10Tweaker? Developed by WindowsInstructed for tweaking your Windows experience without endangering your system. You can download it by clicking on the button below. It includes more then 100 tweaks!

The Tweak

Registry Edit

Registry Editing can be dangerous and should be done with care. Please make a restore point before editing your registry. If you have doubts about what you are doing, then stop immediately and ask for support in the comments. We would like to remind you that editing your registry is at your own risk. If done wrong Registry Editing can lead to system corruption and might even render your system unusable resulting in re-installation of your operating system.

1. On your keyboard press the Windows flag and the R key at the same time (Windows +R) or open Start.

2. Now type Regedit.exe (1) and click on OK (2)

3. Now Unfold HKEY_CURRENT_USER

HKEY_CURRENT_USER App download statistics by country.

4. Then Unfold SOFTWARE

5. Then Unfold Policies

6. Then Unfold Microsoft

7. Then Unfold Windows

8. Then Unfold Installer

9. Now double-click on AlwaysInstallElevated and change the value of AlwaysInstallElevated to 1

If the key does not exists then right-click an empty spot and choose New then choose DWORD.

11. Click on OK and close Regedit. A reboot might be necessary for the changes to take effect upon your system.

If you wish to disable this tweak at a later moment just repeat the steps above and change the value back to the original value, which was 0. If you have any questions about this tweak, please feel free to ask them.

Solved it!
Helped me
Didn't work
Inaccurate Information

How-to Turn off Notifications in Windows 8 and Windows 10
How to Disable Task Manager in Windows 8 and Windows 10

Install With Elevated Privileges Xpress