LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview cannot create folder/files in programdata folder

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.

 

0 Kudos
Message 1 of 8
(5,960 Views)

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,

0 Kudos
Message 2 of 8
(5,919 Views)

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.

 

0 Kudos
Message 3 of 8
(5,905 Views)

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.

0 Kudos
Message 4 of 8
(5,878 Views)

"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?

0 Kudos
Message 5 of 8
(5,869 Views)

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

BeauH
Applications Engineer
National Instruments
0 Kudos
Message 6 of 8
(5,846 Views)

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?

0 Kudos
Message 7 of 8
(5,843 Views)

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?

0 Kudos
Message 8 of 8
(5,815 Views)