Windows Vista manifest to avoid UAC errors?

Posted By: jaknine

Windows Vista manifest to avoid UAC errors? - 07/01/09 21:45

Has anyone here had luck in suppressing error messages (specifically error E1514) that arise from people with Vista not having checked the "Run as Administrator" checkbox in the shortcut for the program? I know that it's possible to add a manifest file that instructs Vista to run a program as admin but what I don't know is how to incorporate this into an A7 build.

Our program reads and writes to settings files and if the user has Vista and doesn't have admin privileges the program crashes out with an error E1514. Since there's no error handling in the engine (I would love an error trap for this) there's no way to avoid the problem except for telling people to check mark the "run as administrator" box in the shortcut. This is frustrating.

Does anyone here have any suggestions?
Posted By: jaknine

Re: Windows Vista manifest to avoid UAC errors? - 07/01/09 22:03

I found what I think is an ok workaround. Apparently Vista only has issues if the program trying to read\write files is in the "Program Files" or "Windows" directory. I just changed my installer to default to installing the app folder into the C: drive instead of "Program Files" (where it's supposed to go) so hopefully this will end the problem.
Posted By: LazyDog

Re: Windows Vista manifest to avoid UAC errors? - 07/01/09 23:55

if you're trying to write data to a sub-directory of your program's directory then I suggest that when you install your program have your installer set the data directory or any directory that needs to be written to as writable by all users. if you use inno setup it's a piece of cake to do this.
Posted By: jaknine

Re: Windows Vista manifest to avoid UAC errors? - 07/02/09 01:27

Yes my installer (Setup Factory Pro) already does this but that's not the problem, it's the error that comes up when Vista tries to access the files if the user isn't set to "admin".

We also get many emails about this issue from a game we released a year ago done with 3DGS and I always have to tell Vista users to do the shortcut thing where they set it to "run as administrator". Now that I found the work-around earlier I'm going to update the installer for both games to not install into Program Files and hopefully that will solve the problem once and for all.
© 2024 lite-C Forums