LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

progmatically save to password protected network folder

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

Kenny

0 Kudos
Message 1 of 6
(3,663 Views)

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.

0 Kudos
Message 2 of 6
(3,656 Views)
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.
Kenny

0 Kudos
Message 3 of 6
(3,650 Views)

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

0 Kudos
Message 4 of 6
(3,642 Views)

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

 

Message Edited by dan_u on 08-27-2008 05:31 PM
Message 5 of 6
(3,631 Views)
Dan - Worked like a charm, thanks
Kenny

0 Kudos
Message 6 of 6
(3,618 Views)