Page 1 of 1

RegKey: Placing your application running as Administrator

Posted: Tue Sep 02, 2014 10:51 pm
by Pablo César
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