Connect to Network Folder on Application Start from Workgroup Configuration
Posted on 2009-07-16
I have a customer who has a wireless network set up in workgroup configuration such each laptop on the network does not automatically connect to folders outside that computer when the laptop is powered up. She is using an appiclation (developed by me) that connects to a database located on a PC or server located other than the one that contains the application that needs to connect to the database, like so:
Laptop application >>>>>>>> PC (containing database)<<<<<<<<<<<<<Laptop (application)
The PC is not automatically accessible to the laptops on startup, so right now she either needs to use a tool in the application itself to reconnect to the PC or use Windows Explorer to find the folder and then open the application. It would be preferred if somehow the application could just automatically open the relevant networked folder without requiring a user to "manually" connect to it. How can I do that?
Incidentally, I know that the method System.Diagnostics.Process.Start("net", @"use \\folder\name password /user:user") will work, but it flashes the DOS screen on the page when executed, which might be alarming to users, so I was hoping there's another way.
Thanks. Please let me know if you need additional information.