xcabur
3rd June 2008 14:43 UTC
Vista Permissions in C:\ProgramData
Hello together
I need your help again and i hope you can help me.
I'm not sure that it is a problem from nsis but maybe you have an idea how I can do it.
I have an Access Database which needs permissions to right in his tables. My NSIS Setup install the DB and other files under vista in the %programdata% directory. Because the whole %programfiles% directory is read only under vista.
When I start the Setup the UAC appears and the files will correct install. But when I want rename the installed files a message appear and notifiy me that the file is write-protected when I force this process (choose continue) the file will renamed.
This problem exits with the Database, PDF, or any other installed Files. When I open the DB he open as read only.
When I delete this files and I copy the files manual in the same directory. I can rename the files. The NTFS Permissions aren't the problem. The System was restarted.
I think windows mark the files with read-only permissions because they will created by setup.
Has anybody an idea how i can install files in the %programdata% directory without this read-only problems?
Thanks for help
tictox
4th June 2008 11:34 UTC
I have been on a learning curve myself concerning vista UAC issues..
basically
To write to program files , your application needs to be run as Administrator , to achieve this your application needs a manifest file which grants this permission.
I was not the developer of some of my applications exe files and so i used a external manifest file to do this..
IF you have previously installed your application without any manifest , and plan to now use a manifest , windows will not read the file unless you change you exe's time stamp , I did this by simply opening the exe in notepad scolling to the end , click to type , press spacebar and then backspace and save , which alters the timestamp.
I had to give admin rights to my update manager exe as it copies files to program files..
if you want to see whether UAC is creating virtual directories for your application you can run %LOCALAPPDATA%\VirtualStore and look in the program files folder .. technically you dont want vista creating this for your app , and is a sure sign that you have not handled UAC correctly .. im still learning all this myself , please reseach everything I have stated yourself and get other opinions
hope that is some help
Ian
xcabur
4th June 2008 14:01 UTC
First of all thanks for your help.
But I don't want install my Tools into the Programfiles directory but into the programdata directory it's euqally to the alusersprofile directory.
Normaly the ProgramData Directory isn't watch by vista UAC who ever I run the Setup anyway with administratur rights.
But the Files are read only. When I copy the files manuel (not with a setup) in the same directory then I have no problems.
Have you got an idea?
This is the Notification:
http://www.administrator.de/images/a...rogramdata.jpg
xcabur
4th June 2008 14:56 UTC
ok, I have find out that the install root directory hast set the write-protected flag. But I can't uncheck it. When I call the Preferences again the flag is set again. How can I uncheck it or why is the flag not set when I creat the directory manual?