Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to make a shortcut/batch file to prompt for username/password and then for a specific directory to be opened in Windows Explorer. I'm using Windows XP.

The following prompts for the other PC's username/password and opens explorer to show Printers and Faxes/Scheduled Tasks (nearly there but not quite):

explorer.exe /e,/root,"\\"

What I want to do is something like:

explorer.exe /e,/root,"\\\",/select,"\\\c$"

Unfortunately, all this does is show my own PC's C: drive.

Any ideas if this is possible (and if so where I'm going wrong)? Thanks.

share|improve this question
up vote 2 down vote accepted

You could map the other directory to a drive letter, and then open it in explorer. I don't recommend that you link to c:\, but if you need to...

LinkToFolder.bat (username and password need to be replaced with your username and password)

net use x: \\\c$ password /USER:username
explorer x:\
share|improve this answer
Rather than hard code the "x:" see this question for getting the next available drive letter:… – Neal Oct 23 '09 at 9:24
+1 for @seanyboy and +1 for @Neal - used both to find the solution - thanks. – Umber Ferrule Oct 23 '09 at 11:51

Maybe this will work for you. It'll open your directory and show it as the root:

explorer.exe /e, /root, \\\c$
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.