|
|
|
|
#1 |
|
Junior Member
Join Date: May 2009
Posts: 2
|
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 ...
|
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
Use RequestExecutionLevel admin
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: May 2009
Posts: 2
|
That is exactly what I was looking for, I've tried and it work perfectly. Thanks!
|
|
|
|
|
|
#4 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
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
IntOp $PostCount $PostCount + 1 |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|