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?

  • Elevation is stored by file - renaming the file breaks this, obviously. Do not rename the file. Simple like that. – TomTom Dec 4 '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 4 '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 4 '14 at 16:07
  • Well thats exactly what i was thinking but i guess it does get lost? – red888 Dec 4 '14 at 17:06
  • 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 5 '14 at 12:07
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.

  • Great thanks just wanted to confirm that. Just did think a rename would break this – red888 Dec 4 '14 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.