06-23-2011 02:31 PM
The folders on our network have a set level of permissions. Currently we use a generic account to login to the computer that has access to be able to "write" to certain folders on the network. We want to limit access of this generic account to the network folders, but still give LabView the capability to write to them (i.e. Test data).
Does LabView have a way of sending login information, before writing to a file/folder, that is different than the 'current user' logged in to the local machine?
There are a couple of VIs to get permissions and set permissions, but not to the level I need with sending actual login information (i.e. user name & password).
Thanks in advance for you help!
Jeff
06-27-2011 08:20 AM
Hello Jeff,
At which step during VI execution are you looking to enforce the user name and password? This example allows different levels of access to different parts of the VI, so you could restrict access to the write section. Here is another way to protect code sections through a user interface password entry, and you could add a user name section as well. Are you looking to write the test data to Microsoft Excel? If you have the Report Generation Toolkit, this example may be helpful. Let me know if you have any questions.
Regards,
Deborah Y.
06-27-2011 09:12 AM
I don't think I phrased my question clearly. Our network drives have a level of security that requires a user name and password. Certain users are given permissions to write to the drive, others are given read only access. I want labview to be able to write to the drive even if a read only user is logged into the machine. I could code labview with a different user name and password than what is logged in to the machine. Does this make sense?
06-27-2011 09:19 AM
It does. LabVIEW has no mechanism for doing this. And neither do regular non-LabVIEW applications. LabVIEW just calls the system file functions using the credentials of the logged in user. If you want it to use a different set of credentials, then that's called impersonation. You can also simply use the runas command if you're in Windows.
06-27-2011 09:24 AM - edited 06-27-2011 09:27 AM
I have never heard of the runas command. Looks like it is what I need. I will give this a try. Thanks for the reply!!
06-27-2011 09:34 AM
An other option could be to set up a FTP server and use ftp,
M
03-21-2014 06:47 PM
Trouble escribió:
I have never heard of the runas command. Looks like it is what I need. I will give this a try. Thanks for the reply!!
Do the runas command worked? Do the user has to be with a specific configuration to work form the command line?
03-22-2014 08:46 PM
With .NET4.0 or later active directories work for using enterprise credentials. (Trust me) I cannot pubically provide such examples but I have made this work! Do not try with .NET 3.5 or earlier- it will not work.
03-24-2014 02:34 PM
I briefly tried it, but did not get it to work right away. I was able to implement a different solution completely. I would like to go back to this and try again though.
04-01-2014 09:24 AM
Thanks for your answers. We didn't get it to work with runas command nor the enterprise credentials but our solution was to use ftp ( as marcomauri suggested it) with a single username use it only in labview code.