Weston Goodwin
Weston Goodwin

Reputation: 813

Stop program from running as admin

I have a program that runs with elevated privileges when I double click on the icon(Task Manger shows Elevated = Yes). I do not want it to run with elevated privileges but I have not been able to figure out how to turn it off.

I checked the following places:

1.)Right Click on the shortcut -> Advanced -> Run as admin is unchecked

2.)Right Click on the shortcut -> Compatibility -> Run as admin is unchecked

3.)Right Click on the exe -> Compatibility -> Run as admin is unchecked

I've tried the following commands:

1.)runas /trustlevel:0x20000 "newapp.exe"

2.)runas /user:domain\username "newapp.exe"

No matter what I do or check the app still runs with elevated privileges. Any ideas on how to resolve this issue is greatly appreciated.

Upvotes: 2

Views: 6124

Answers (1)

Anders
Anders

Reputation: 101569

There are at least 4 reasons why Windows might decide to UAC elevate a new process.

  • requestedExecutionLevel in the manifest is set to requireAdministrator or highestAvailable.
  • Installer detection.
  • The compatibility tab for the shortcut or .exe has set certain properties (run as Windows XP etc.)
  • ShellExecute was invoked with the RunAs verb.

The application manifest is embedded in the .exe or in a file next to it named "applicationname.exe.manifest". You can explore the embedded manifest with a tool like Manifest View or Resource Hacker.

If you did not write the application yourself, do you actually know if it will even work if not elevated? You can try to force it in cmd.exe:

set __COMPAT_LAYER=RunAsInvoker
c:\path\theapp.exe

Upvotes: 2

Related Questions