views:

178

answers:

2

Hi,

I have some EXEs for which I do not have code. Can I still add manifest files?

Also, according to my understanding of the topic, for a program to be Vista compliant, it should not write to any secured locations like HKLM, Program Files etc.

For registry we can use HKCU, but about the files that are getting created in Program Files? should they be created in an unsecured location during the execution of EXE?

Thanks

A: 

You should be able to create a manifest file without source code.

It it OK to require administrative privileges for installation or updates, so you can put the EXEs and DLLs (and supporting files) in Program Files.

It is not OK to require administrative privileges for regular usage, so you should put data files and settings in the registry in HKCU or in the user's Application Data folder.

SLaks
Is there any windows api to directly get the applications data folder path?
coolcake
Sorry, forgot to thank you. So, thank you!!!
coolcake
Your applications data folder should be created by yourself under %appData%
MSalters
A: 

You can add a manifest using an external file. Just place the manifest in the folder with the exe and name it "file.exe.manifset" where file.exe is the executable file name. However on Server 2003, Vista and later if the program has an embedded manifest, the external manifest will be ignored by default. There is a registry key that will override this behavior or you can use the mt.exe from the Windows SDK tool replace the manifest in the exe. See this link for more details.

For existing applications that try to write to Program Files or HKLM, they should work on Vista because Vista redirects the writes to another location and makes it appear to the application that the write succeeded.

shf301