"Run this program as administrator" flag gone after installi

Common questions about using Actual Installer.

"Run this program as administrator" flag gone after installi

Postby Zanko » Thu Jul 11, 2013 7:37 am

Hi,

I have the flag "Run this program as administrator" on the main executable in the application my (actual) installer installs.
The source file have the flag enabled, but the installed executable has got this flag lost.

Is there any way to preserve it?
Zanko
 
Posts: 1
Joined: Thu Jul 11, 2013 7:34 am

Re: "Run this program as administrator" flag gone after inst

Postby Leo » Fri Jul 12, 2013 5:55 am

In order to add the attribute "Run this program as administrator" to a file you need to add the following registry key (on the System\Registry tab):
Code: Select all
For All Users:
Registry Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
For Curent User:
Registry Key: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
ValueName: <InstallDir>\file.exe
Value Type: REG_SZ
ValueData: RUNASADMIN


Where <InstallDir>\file.exe is a required file.
Leo,
Actual Installer Team
http://www.actualinstaller.com
Leo
Site Admin
 
Posts: 358
Joined: Fri Jan 22, 2010 12:40 pm

Re: "Run this program as administrator" flag gone after inst

Postby mucio77 » Sun Mar 09, 2014 9:43 pm

Thanks for the add.
mucio77
 
Posts: 1
Joined: Mon Mar 03, 2014 10:06 pm

Re: "Run this program as administrator" flag gone after inst

Postby AndrevanHaren » Thu Jul 18, 2019 1:45 pm

I am trying to make this work as well for my app. The program runs fine after the installation is finished and run from within the installer app, but when I try to run my app after that again, I get all kind of errors, because it is not being launched as an administrator.

I tried the solution given here, but it doesn't work for me. Probably because I am not running Window NT but Windows 10? If so, how does the installer knows where to place the registry code when other windows version are being used? What would be the correct path for Windows 10?
AndrevanHaren
 
Posts: 13
Joined: Mon Jul 15, 2019 6:01 am

Re: "Run this program as administrator" flag gone after inst

Postby AndrevanHaren » Thu Jul 18, 2019 2:07 pm

Leo wrote:In order to add the attribute "Run this program as administrator" to a file you need to add the following registry key (on the System\Registry tab):
Code: Select all
For All Users:
Registry Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
For Curent User:
Registry Key: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
ValueName: <InstallDir>\file.exe
Value Type: REG_SZ
ValueData: RUNASADMIN


Where <InstallDir>\file.exe is a required file.


Shouldn't the Value Name and ValueData be switched?
AndrevanHaren
 
Posts: 13
Joined: Mon Jul 15, 2019 6:01 am

Re: "Run this program as administrator" flag gone after inst

Postby Leo » Thu Jul 25, 2019 6:40 am

try this:

Code: Select all
Bitness: Default
Registry Key: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
ValueName: type the path to the file, e.g.<InstallDir>\file.exe
Value Type: REG_SZ
ValueData: RUNASADMIN
also try
ValueData: ~ RUNASADMIN
Overwrite: yes
Remove on uninstall: yes
Leo,
Actual Installer Team
http://www.actualinstaller.com
Leo
Site Admin
 
Posts: 358
Joined: Fri Jan 22, 2010 12:40 pm


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 6 guests

cron