Run As Administrator
Run As Administrator
When you right click on a shortcut in Vista, there's an option to Run As Administrator. Does anyone know how to set this characteristic to a shortcut when it is created with IA so that it runs as Administrator without the user having to right click on the icon and select that option?
You can't change the shortcut. You need to inject an application manfest into your EXE that makes a request to the UAC to elevate your privileges.
Here's how you do it:
http://softlogger.com/5588/most-popular ... t-exe.aspx
More info on UAC elevation here:
http://technet.microsoft.com/en-us/wind ... 06021.aspx
Including the elevation manifest won't stop UAC prompting though. You need to turn UAC off in order to avoid prompting. You can do this simply like this in IA:
Run Program reg.exe ADD HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System /v EnableLUA /t REG_DWORD /d 0 /f (WAIT)
You will then need to reboot.
Here's how you do it:
http://softlogger.com/5588/most-popular ... t-exe.aspx
More info on UAC elevation here:
http://technet.microsoft.com/en-us/wind ... 06021.aspx
Including the elevation manifest won't stop UAC prompting though. You need to turn UAC off in order to avoid prompting. You can do this simply like this in IA:
Run Program reg.exe ADD HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System /v EnableLUA /t REG_DWORD /d 0 /f (WAIT)
You will then need to reboot.
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Very interesting. Presumably the turning off of UAC will require a separate UAC prompt? Or will it not require that prompt when the InstallAware setup has been previously blessed by UAC?
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Ah, true. However if setup is running without admin privileges, then this approach would fail, as in that case UAC blessing will not occur.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Most apps require admin privs before installation anyway since the will have limited access to the machine irrespective of whether UAC is active or not.
Our installer requires admin privs. However, on Fista as part of the certification process your app is supposed to _not_ require admin privs. Fat chance when you want to do anything fancy under the hood.
Our installer requires admin privs. However, on Fista as part of the certification process your app is supposed to _not_ require admin privs. Fat chance when you want to do anything fancy under the hood.
-
- Posts: 7
- Joined: Sun Mar 11, 2007 4:44 am
- Location: England
- Contact:
H4nd0 wrote:You can't change the shortcut. You need to inject an application manfest into your EXE that makes a request to the UAC to elevate your privileges.
Here's how you do it:
http://softlogger.com/5588/most-popular ... t-exe.aspx
I've just tried adding a manifest using the following steps in a batch file:
miabuild myproject.mpr
mt.exe -manifest myproject.exe.manifest -outputresource myproject.exe;#1
signcode -cn "My Company Cert Name"
etc, but after the mt.exe stage, the output of the miabuild is truncated to around 260 KB.
Is the InstallAware exe not a standard windows exe file that mt can operate on? I'm using InstallAware 6.4
Anthony Wieser
Wieser Software Ltd
Who is online
Users browsing this forum: No registered users and 89 guests