views:

132

answers:

2

Under Windows Vista (2008 and Seven), an application cannot write in Program Files Folder. I understand that UAC is the responsible, but it prevents my application to self-update. Is there a folder somewhere (available in Windows XP, Vista (and all other version)) which would allow me to deploy my application and let it self-update without having to make it "elevated"?

I thought of ClickOnce, but I can't use since I don't want to pay for the expensive certificate (sign the code, installer, etc.).

Thanks!

+2  A: 

You should probably ask permission before updating the application anyway. Trying to write to C:\Program Files is inherently a risky operation that the user should authorize. So I would just tell the user what you're doing, and let her allow the updater to do its job.

Ben Alpert
+2  A: 

I personally abhor this idea but several apps have gone down this route: Instead of installing your application into the Program Files directory, install into the AppData directory.

I first saw this with Microsoft's SyncToy PowerToy, and then with the set of patches for World of Warcraft before the Wrath of the Lich King release. Most recently, I've seen Google Chrome also install into the AppData directory.

The reason why I hate this idea is that for the small convenience of not getting a prompt for installation or patching, I now have the potential risk of malware quietly modifying and the binaries for the apps installed into AppData.

Ants