Page 1 of 1

Shortcut Icons and Set Registry Value of a Exe to runasadmin

Posted: 13 Apr 2016, 07:44
by dassoubarna
Although I set icons for both Desktop and Startup shortcuts as

Code: Select all

<installpath>\MyExe.exe
Or

Code: Select all

<installpath>\MyIcon.ico
but it always set a blank icon. How to resolve the isue? There procedure to set icon is not mentioned in the Documentation.

Moreover I want to run my program exe as "RUNASADMIN" and for that I add a registry key as

Code: Select all

Root: "HKLM";
 Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\";
ValueType: String;
ValueName: "<AppName>\MyExe.exe"; ValueData: "RUNASADMIN";
But that is also not working.

Can anyone please help on that two topics? Thanks in advance.

Re: Shortcut Icons and Set Registry Value of a Exe to runasadmin

Posted: 13 Apr 2016, 09:30
by Soner
Hello,
what icon index are you using for the "<installpath>\MyExe.exe" configuration?

Re: Shortcut Icons and Set Registry Value of a Exe to runasadmin

Posted: 13 Apr 2016, 15:42
by dassoubarna
Soner wrote:Hello,
what icon index are you using for the "<installpath>\MyExe.exe" configuration?
I tried '0', '1' and '2' but nothing worked

Re: Shortcut Icons and Set Registry Value of a Exe to runasadmin

Posted: 13 Apr 2016, 17:45
by Soner
Hello,
I sent you a personal message in order to solve this problem.

Re: Shortcut Icons and Set Registry Value of a Exe to runasadmin

Posted: 15 Apr 2016, 08:20
by dassoubarna
Soner wrote:Hello,
I sent you a personal message in order to solve this problem.
Thank you Soner. I have resolved Issue by set all icon index to '0'. Now It works like a charm.

Just one more help I need.

I set to my installed exe to run as admin. For that I set a registry value like

Code: Select all

Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\";
 ValueName: "<AppName>\MyEXE.exe"; ValueData: "RUNASADMIN";
It is not working. Am I doing something wrong? Please suggest.

Re: Shortcut Icons and Set Registry Value of a Exe to runasadmin

Posted: 15 Apr 2016, 18:27
by Soner
Hello,
normally you would configure your executable manifest file to make it only run in administrator mode. What does your manifest file look like?

Re: Shortcut Icons and Set Registry Value of a Exe to runasadmin

Posted: 27 Jun 2016, 07:47
by CFerg
Hi,
I too am interested in having the end user run the app in admin role. I'm new to installForge, and am unsure where the manifest file is.

Please clarify. I'm using version 1.3.1

Re: Shortcut Icons and Set Registry Value of a Exe to runasadmin

Posted: 30 Jun 2016, 21:54
by roemer2201
dassoubarna wrote: ...

Code: Select all

ValueName: "<AppName>\MyExe.exe";
...
You should try <InstallPath> instead of <AppName>:

Code: Select all

ValueName: "<InstallPath>\MyExe.exe";
Or is there a special reason for using <AppName>?