views:

234

answers:

1

I'm currently making a program for a lan center that scans a users hard drive, and copies/archives certain save game files into a zip and uploads them to a FTP server. But I've created a lot of the program at this point and just had a major issue that I had not tested for spring to mind:

How does Vista/7's UAC permissions account for copying of these save game files? - As far as I'm aware, if a program tries to save a game to the C:\Program Files directory, it catches the call, redirects the file to another folder meant for such changes...the C:\Users directory as I recall?

So if this is the case, if my python program tries to copy from the c:\Program Files directory, will it also redirect and copy the appropriate information where applicable? Will I need to somehow invoke UAC to get folder permissions for a read-only event? I've tried googling the info for the workings of UAC but my google-fu isn't exactly up to par lately. Am I going to need to write an entirely new section of code to work around UAC or will it "just work™"?

IF it's not going to "just work™" what am I going to need to do to get permissions to access the files I need to copy/archive? I'm asking primarily because I don't have a vista/7 install to test against. =/

A: 

If your program is running as elevated admin, then it will not redirect to c:\users folder. You can run the program as elevated admin by embedding a manifest to the file. see http://en.wikipedia.org/wiki/User_Account_Control for details on tasks that trigger the UAC prompt.

Also note that 64 bit Windows 7 does not support File System Redirection.

Santhosh