exe - Microsoft signtool removes administrative privileges? -



exe - Microsoft signtool removes administrative privileges? -

i need sign installer executable windows using p12 file.

before signing, exe file icon has "shield icon" on indicating requires administrative privileges, should.

however, after sign using signtool , next command:

signtool.exe sign /f mycert.pfx /p <password> /t http://timestamp.verisign.com/scripts/timstamp.dll /v "<file signed>"

the signing succeeds shield icon disappears. when run resulting executable, fails because no longer running under administrative privileges.

what need in order sign executable , have maintain administrative privileges?

you should set requestedexecutionlevel requireadministrator in app's manifest declare needing administrative privileges.

i suspect app named "install" or similar, , non signed-and-manifested version picked administrator requirement part of backwards compatibility settings, looks current application , windows checks see privileges requests, , since doesn't request app doesn't elevated.

see create , embed application manifest application depending on how app created @ /manifestuac (embeds uac info in manifest) , /win32manifest (c# compiler options)

exe sign administration

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -