2

I'm looking for a simple Windows utility which would ideally be able to be pre-configured with the UNC of a Windows share, and then on running, ask the user for his or her credentials and then mount that share to a predefined drive letter.

As background, I'm setting up a virtual machine for a user who needs to regularly connect to another organization via VPN, mount a network share, and then run an app which depends on that network share being present and mounted to a known drive letter. The problem is that, since we're two mostly-unrelated organizations, the login credentials of the user on the virtual machine will be entirely different than the login credentials needed to access the network share; worse still is that the VPN connection takes place via an SSL VPN which doesn't provide an easy way for users to specify post-login scripts or anything convenient like that.

Since the ability to even FIND, much less mount, the network share depends on the VPN already being up and running, I can't map the share as a reconnect-at-login share for the user. I also have no way of making the VPN connect at login; the VPN client prevents caching of credentials, and in any event, the credentials will change every 30 days due to the security requirements of the hosting organization.

So ideally, I'd love to be able to provide a shortcut on the desktop that, when clicked, brings up a simple dialog asking for the user's credentials, and then tries to map the share. Does such a beast exist?

3 Answers 3

5

Well, you can cobble together a simple batch file which might look a little like the following (untested, but should work):

@echo off
set /p user=User name: 
net use x: \\server\share * "/user:%user%"

net itself will ask for the password when * is given (and won't display it when entering). Above batch file asks for the user name with the normal prompt.

1
  • I had no idea you could have net use ask for a password -- that's handy, and exactly what I need. Thanks a ton!
    – delfuego
    Dec 18, 2009 at 19:52
1

The simplest I know of, even without a GUI, is net, which comes with Windows itself. It's as simple as net use E: \\some\share /user:myname, and will ask for a password if necessary. It's also good to delete a share, for example net use E: /delete. See net use /? for usage.

0

Perhaps NetDrives is for you.

NetDrives is a Windows utility that helps you manage your network shares and mapped network drives.

Features and Screenshots

* Simple configuration of network shares and user logins.
* Supports both UNC connections and mapped network drives.
* Quick access and monitoring of shares through system tray (optional).
* Optionally reconnects to selected shares on startup.
* Optionally starts with Windows and runs in background (system tray).
* Secure password storage (based on Windows Data Protection API).
* Open source (C#, WPF). 

Net drives

Net drives 2

1
  • Hmm -- this might be a little overengineered for my use, but looks handy nonetheless.
    – delfuego
    Dec 18, 2009 at 19:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .