08-27-2008 08:10 AM
I am looking to save a file to a password protected network folder. I tried using the standard Write Text.vi to see if a dialog would pop up, but it did not. There is not an ftp server running on the networked computer, so I dont think that will work.
The IT department directions to the folder say: Go to Start> Run and enter url \\computername\folder\subfolder\... and a dialog will appear to enter username and password.
Any ideas??
Thanks
08-27-2008 08:43 AM
Well this is what we do. Run--->(doubleslash(\\) computername slash(/) d$)
Eg: \\pc48\d$ .When you get a popup(U should) type the username and password of the that computer having admin rights.
08-27-2008 09:15 AM
08-27-2008 09:43 AM
muks wrote:Well this is what we do. Run--->(doubleslash(\\) computername slash(/) d$)
Eg: \\pc48\d$ .When you get a popup(U should) type the username and password of the that computer having admin rights.
That simply reiterates what the IT department originally told the poster to do, except that you're using the administrative share.
Kenny K wrote:
I should have noted that there should be no user interaction, ie they should not be entering the username and password, the program should login and save the file automatically. sorry.
To do this you will need to delve into the Windows API. You can also use .NET to perform impersonation. Most of the examples that are on the internet are based on .NET 1.1 and it's probably easier to simply create yourself a custom class that you can call using a single method rather than trying to put all the .NET code into LabVIEW. An example of using impersonation (though there are lots of them) can be found here.
08-27-2008 10:30 AM - edited 08-27-2008 10:31 AM
You could also try mapping the network drive using "net use". This should be possible using system exec.
"net use" lets you specify a drive letter and user credentials to use. After mapping the network drive you should be able to access it as if it was a local drive.
Hope this helps
Daniel
08-27-2008 01:23 PM