Skip to content
⌘ NSIS Forum Archive

Error opening File - Windows Vista

4 posts

BioK#

Error opening File - Windows Vista

Hi everybody, I have a problem with my installer when I run it in Windows Vista. It install files in C:\Program Files. It work well in Xp but in vista it give me this error

Error opening file for writing:
C:\Program Files\....

I've read somewhere that is because, don't have the proper folder permissions to write to the program files folder. If I right click in the installer and choose "run as administrator" it works, but is there another way to do that right in the script? Because it is not very intuitive that the user run the installer as administrator....

Waiting for answers ... 🙂
Anders#
it does not work in xp either, you are just testing as admin. You need to use the userinfo plugin in .onInit or .onGuiInit to check if the user is admin or not