Forum > Windows

Modify Manifest Res?

(1/1)

codeman:
Hello,
Maybe its a dump question but is it possible to modify manifest res of my app on runtime (programmatically) somehow? 

Thaddy:
That depends. Is your applicatin 32 bit or 64 bit and signed?
If an Windows application is codesigned it is impossible, that is why it is codesigned.
If an Windows application is NOT codesigned you can use the techniques from e.g. https://www.delphibasics.info/home/delphibasicsprojects/xnresourceeditor-fullyfeaturedresourceeditorwithdelphisourcecode. That sourcecode contains everything you need, but note that the program itself should not be running. I am not talking about that program ( the editor) but about the techniques you can copy from its sources.
 You can not change a resource from a running program.
But WHY do you want to change a resource - any resource including manifests - at runtime? It is a huge security risk.

codeman:
@Thaddy  is a 32bit app and its not a designed jointly app. Mainly i use Reshacker editor but thanks. All i wanted to do is to remove admin privileges and set asInvoker after a procedure is done. (for faster execution if that make sense).

*You can not change a resource from a running program.*   
im taking that as your anwser because thats what i wanted to do.
Thanks tho.

Remy Lebeau:

--- Quote from: codeman on January 13, 2022, 04:15:31 pm ---is it possible to modify manifest res of my app on runtime (programmatically) somehow?

--- End quote ---

No, it is not.  However, it is possible to create separate Activation Contexts at runtime from different manifest datas, and then switch between them as needed.


--- Quote from: codeman on January 14, 2022, 01:49:10 am ---All i wanted to do is to remove admin privileges and set asInvoker after a procedure is done. (for faster execution if that make sense).

--- End quote ---

Modifying manifests and ACs is not the correct way to accomplish that.  Use impersonation instead.

Navigation

[0] Message Index

Go to full version