LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Installer Changes File Permissions

Guru,

 

 

What was catchy?

 

I am the administrator for this laptop.  See the attached jpg.  I always log on as Steve which is a member of the Administrators Group.  The right image is of the Steve Properties memebership.

 

Steve

0 Kudos
Message 11 of 17
(1,925 Views)

Hi steeve,

 

i am also facing the same problem in my application.

In my application, i am writing to and reading from data.ini file.

i created an exe and an installer and installed in the laptop which is having admin rights.

 

Initiaillay installer have been installed in C drive, got an error 8, which gives the error description as "file permission error".

then  uninstalled it and again installed in other drive.After installation,when i select the installer from the "All programs", application had been in task bar for 1-2 seconds and then it disappears.

 

I think you might have got the solution for the same problem. please help me in this regard.

 

Thanks in advance!.
Regards

geeta

0 Kudos
Message 12 of 17
(1,844 Views)

Hello Geeta,

 

Are you sure that this is the same error?  You said "Initiaillay installer have been installed in C drive, got an error 8, which gives the error description as "file permission error"."  Does this mean that you are getting the error when you run the installer?

 

If you are not getting the error during the install and are getting it when you run the LabVIEW built .exe, could you give me some information about the OS that it is running on and the location of the data.ini folder.

Justin Parker
National Instruments
Product Support Engineer
0 Kudos
Message 13 of 17
(1,820 Views)
Geetakk, 
 
I want to make sure we're talking about the same problem.  I build my application in LV and have administrator rights on my laptop.  Then I build the installer and installed it on a target computer.  The application reads and writes to files but the only way I can write to files on the target computer is when I'm logged in as an administrator.  If I log on as a User then I get a file permissions error when I write to the files. 
 
About 2 weeks ago I started working on this again and have a potential solution.  I have not fully tested it out, though (I tested it on one computer which is not a rigorous test).  Note:  I did my testing in Windows XP using LV 8.6.  Here are the steps:
  1. On my development laptop I go to C:\Program Files\National Instruments.  I right-click on the National Instruments folder, bring up the properties and go to Security.  I select Users and give them Full Control and press the Apply button.  It took almost 10 minutes for Windows to come back from applying the new properties.  Then I clicked the OK button to close the window.
  2. Next I did the same thing for the main folder of my development software and ini files.  For example, all of my work is in the C:\Work folder, so I gave that folder (and all sub-folders) user permissions like in step 1.
  3. I built the executable and installer on my development laptop while logged in as administrator.
  4. I logged on to the target computer as an administrator and installed the software.  Note - I had to be logged on as admin for the installation.
  5. On the target computer I repeated steps 1 and 2, above, for the National Instruments and Work folders.
  6. I logged of the target computer and logged back in as a user.  I ran the software and could read and write to files.
 Steve
 
0 Kudos
Message 14 of 17
(1,807 Views)

 

Hi Waldemar,

 

what about to read the environmental variable from windows via a dos command? I found out that XP and Win 7 for example don't use similar environment variables.

 

I have a similar Problem. I want to read a file on startup for user specific GUI behavior (properties) and on closure the software writes the latest changes to the file.

 

1. What is the best way to get the path of the file in my application?

2. How do I create an Installer Package that distributes the file to this "user app" path?

 

Greetz Bastian



0 Kudos
Message 15 of 17
(1,664 Views)

Usually this is done with the configuration file VIs which will read and write settings and such to the application ini key.  Everytime you create an application it also makes an ini key with the same name.  You can use the configuration File VIs to access this data and use it in your application.

 

Normally this would be stored int he same location as the application, but it can also be added to the users My Documents folder or other user paths.  Use the Get System Directory VI that comes with LabVIEW 2009 and later in order to access these paths programmatically.  The paths will be different based on which computer you are on and which user is logged in.

 

 

0 Kudos
Message 16 of 17
(1,655 Views)

Hi,

 

i am using LV 8.6 and those VIs don't exist here. Now i have to decide to update my LV version or do it myself via the "read registry" VIs.

 

Thank you so far.

 

Bastian

0 Kudos
Message 17 of 17
(1,644 Views)