0

Running windows 7 sp1.

I have an application that when installed via MSI requires the program's exe to run with elevated credentials.

When I rename the exe it no longer runs with elevated privileges. Is this because of a manifest file that was embedded in exe when it was compiled or how the MSI installed it? How can I prevent it from running as an admin without renaming it?

Edit: I don't think I was clear in what I was really asking. Will the program have to be recompiled by the developer to remove this behavior?

red888
  • 4,069
  • 16
  • 58
  • 104
  • Elevation is stored by file - renaming the file breaks this, obviously. Do not rename the file. Simple like that. – TomTom Dec 04 '14 at 16:01
  • Sorry i dont understand. Stored where in the exe itself when it was compiled? Is the only way to fix this to re compile the application? – red888 Dec 04 '14 at 16:05
  • 1
    Logic for total absolute betinner: If it would be stored in the exe, it would not get lost on a rename. – TomTom Dec 04 '14 at 16:07
  • Well thats exactly what i was thinking but i guess it does get lost? – red888 Dec 04 '14 at 17:06
  • Yes,. Because the settings you make FOR a file are not stored IN The file. Quite obvious, or? Programs are not supposed to be renamed. – TomTom Dec 04 '14 at 18:00
  • 1
    TomTom, that's a little unnecessary, especially considering you're wrong - the manifest IS stored in the file it describes. If you don't have an answer, maybe don't post? – BlueCompute Dec 05 '14 at 12:07

1 Answers1

3

Assuming it's a .NET application, the developer likely embedded a manifest that causes the application to request elevation when run. The manifest is named application.exe.manifest and needs to define the AssemblyName as the name of the program itself, so naturally renaming the .exe file will break the manifest and cause it not to prompt.

The workaround is to use the Compatibility tab and check the box to always run as Administrator so it prompts all the time (or a right-click -> Run as Administrator). Otherwise, leave the name alone or ask the developer to change the manifest.

Nathan C
  • 14,901
  • 4
  • 42
  • 62