09-23-2011 11:08 AM
Hello,
New to LabVIEW 2010 from LV7.0. Been upgrading the first of many apps to the new platform so it can run on Windows 7. In this app, there are files that are to be stored in a folder which will reside in the ProgramData folder. When the application launches, the app checks to see if these files are present, and if not, it creates them with initial values. Or, at least, it works this way on XP. The problem is, it cannot create the folder/files in W7 unless the user is logged on as an administrator. How do I get around this? I thought programs had free reign in the ProgramData folder, as this is where these types of files are supposed to be stored.
Thanks.
09-26-2011 12:32 PM
Hey rickford66,
The Program Data folder requires administrator credentials by default, so try changing the permissions of the folder to allow for more access. Also, Installing applications on Windows 7 is a community discussion that has similar questions with a little more detailed answers.
Hope this helps,
09-26-2011 04:09 PM
Instead of having LabVIEW create the folders and files programatically, I'm now doing it with the installer. This is working, sort of. It is creating the folders and files no problem because you need to be an administrator to install the software anyway. Here's the $64,000 question... How do I make the installer, at the time of creation, set the security preferences of these new files such that any user can use them? I tried checking "unlock" in the installer file settings, but that didn't work. Seems to me there should be some kind of setting in the installer to take care of this. After all, I can't be telling customers to install... oh, then you got to get into the ProgramData folder and change the settings. I understand W7 asking for the admin password at install to some degree, but having to have the customer get into windows and start messing with settings, that just seems like it is asking too much. People want to install their software and run it. I have never installed software yet that required me to make these changes before running it. Thanks.
09-27-2011 06:09 PM
Hi rickford66,
The bottom line is that this is a windows issue because they are protecting people from trying to access the ProgramData folder because it holds such important information. There is no programatic way to go about this without at some point being an administrator or having administrative privelages. If possible, I would recommend keeping the files somewhere other than the ProgramData folder, and then you won't have to worry about the security involved with it.
09-28-2011 09:00 AM
"There is no programatic way to go about this without at some point being an administrator or having administrative privelages."
I agree, but then the person installing it has to be an administrator, so why not set up the file preferences at install, perhaps using the installer?
09-29-2011 03:59 PM
I believe the privileges you are referring to are in the windows OS Admin Account, so when the program is installed from the admin account I believe you can "apply to all users" since the admin account is like the Master user account. Other than that I would have to refer you back to the earlier post regarding having the file install somewhere other than the ProgramData folder.
Good Luck
Beau H
09-29-2011 04:10 PM
Yes, at install, I'd like to "apply to all users" automatically when the installer installs the files. How do I instruct the installer to do so?
09-30-2011 04:41 PM
The unlock feature should work for what you are trying to do. When you check the unlock button in the installer, install the application, and then run the application, what exactly are you seeing happen? For instance, does windows ask you for credentials, or does an error appear? Also, what happens if you try to access the folder navigating to it through windows explorer?