From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Mads

Tools to grant applications access to common application data directories

Status: New

Microsoft introduced a number of restrictions in Vista that makes it more difficult to save program settings and temporary files.

 

Applications can no longer write to the Program Files directory, but even worse; the common application data directories, like ProgramData and Users\Default  are by default only accessible for writes by administrators and the first user that did the write. Sessions by other users only have read access. The same goes for registry access; the computer keys can not be written by everyone.

 

As long as it is OK to not share settings between user's you have one good option left; the user's appdata folder. If you do need to share data though - you need to set the access right of the folders you create in the "common" directories. This can currently be achieved e.g. by using a tool like SetACL, however as it has been made a required action now, it should be included in the installer - AND preferably also as VIs on the file and registry (for registry access) palettes.

 

LabVIEW 2009 introduced one of the tools required to handle the UAC changes - a VI to get the paths of system folders. It should also have a tool to grant access to some of those paths...

9 Comments
EricC.
Active Participant

I have th esame problem

A good think's is to have some tools to acces to all restricted folder.

Exemple : To make a automatic update of an application, you need to have read/write acces to program files folder.

Ingénieur d'Application / Développeur LabVIEW Certifié (CLD)
Application Engineer / LabVIEW Certified Developer (CLD)
AristosQueue (NI)
NI Employee (retired)
I'm not sure I'd want LV to design and ship a general tool for circumventing security of an operating system. That sounds like something that should be a third party component, ie., something you should be asking your OS vendor for.
Mads
Active Participant

The installer typically needs to do such things already, it now just happens to have a hole in its repetoar...

Daklu
Active Participant
I'm not sure I agree with general VIs for modifying ACLs, but the installer definitely needs to be able to support modifying the ACL of directories created during installation.
Tom_Hawkins
Member

I don't think anyone is suggesting tools for 'circumventing' security, but don't Vista / Windows 7 have a mechanism for applications to request increased privileges which the OS will ask the user to confirm by typing their password, in the same way that Mac OS X does? (I'm still an XP user so I don't know!)

 

LabVIEW VI's for hooking into this would be useful - even better if they were cross-platform.

MichaelAivaliotis
Active Participant
You can already set permissions from the command line. And in LV2009 you can run command line after install. Also, you can run command-line stuff from your app too on first launch.


Michael Aivaliotis
VI Shots LLC
Mads
Active Participant
Michael, it was already mentioned in the original idea that there are ways to do this (the most common is to use SetACL)...The whole idea is that, considering how easy it is to run into this as a problem on Vista/Win7, it should be made much easier (and more visible, a lot of users are not even aware of the issue and make software that fail in a multi-user environment because of this).
Message Edited by Mads on 06-14-2010 05:52 AM
BruceMoyer
Member

I'm just experiencing this issue now.  We're finally jumping from WinXP to Win7 here at the office.  Would anyone like to comment as to the best way to set up the ability for All Users to be able to write to a file in the public appication data folder?

orvio
Member

It's really ridiculous that NI claims Windows 7 compatibility but fails to support basic file system options. The help for the Get/Set Permission VIs even states that windows does not support the concept of owners of file system entities.