I have an installer (Inno-Setup) that installs my application to a path defined by the user. At the end of the install routine i want to create a shortcut that starts the ap
You can add a registry-key that tells windows to execute your program as admin:
Under HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
, just add a key(REG_SZ)
with the value RUNASADMIN
. When you launch your exe, you will be prompted for admin-access.
With that, you can simply create a normal shortcut to your executable like you would do it with Inno-Setup.
If you want to do so via a cmd or a batch-file, you can use the following command:
reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "" /t REG_SZ /d RUNASADMIN