RegKey: Placing your application running as Administrator

Topic Specific Tutorials and Tips.

Moderator: Rathinagiri

Post Reply
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

RegKey: Placing your application running as Administrator

Post by Pablo César » Tue Sep 02, 2014 10:51 pm

In this regkey you can configure your application directory and to run without those annoying questions, "Do you want to run as administrator ?"

Windows Registry Editor Version 5.00

Code: Select all

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags]
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\Arquivos de programas\\MeuSistema\\SISTEMA.EXE"="RUNASADMIN"
"C:\\Arquivos de programas\\MeuSistema\\INDEXA.EXE"="RUNASADMIN"
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\C:]
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\C:\Arquivos de programas]
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\C:\Arquivos de programas\MeuSistema]
"sistema.exe"="RUNASADMIN"
"indexa.exe"="RUNASADMIN"
You can also make a procedure let registered your application and avoiding a boring messages.

This tip was extracted from PCToledo forum from: http://www.pctoledo.com.br/forum/viewto ... 847#p90842
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

Post Reply