Accessing a passworded network drive...

B2Ben

Well-known member
Joined
Aug 17, 2006
Messages
52
Programming Experience
Beginner
I'm writing a very simple app to be used within our corporate network. Basically, I am simplifying a common task. The program goes into a shared network folder, finds an XML file, and returns a value located within the file.

I'm trying to make it a pretty solid little app. Some computers may not have access to the network folder. If you were to try opening it in Windows, you would be required to provide a username and password.

Right now, if you don't have access, it just returns an error and pops up a message box telling the user to browse to the folder in windows, then try again.

So... when a PC runs my program, and doesn't have access to the network folder, I'd like one of a few possible things to happen, if possible...

1) My program prompts them for a username and password for the network folder, then proceeds to do it's job after getting access

2) My program tells windows to try to open the folder, and prompts the user for a login/password. (I've tried this with no success thus far). The user logs in, then comes back to my program and tries again

3) My program gains access to the folder with a login/password written into the source code (would like to avoid this)

Any suggestions would be appreciated, Thanks!
 
Back
Top