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

When a removable USB HDD is plugged into a Windows XP machine, can I make Windows XP share it automatically? The drive is moved around quite often, and it is a hassle having to 'reshare' it each time it is plugged in. I was looking at the mountvol command, which might do what I want, but I don't want to waste time and effort if there is an existing solution.

Currently I use

mountvol c:\extern \\?\Volume{ volume_id }

in a .bat file in the root of the drive, with c:\extern shared, but I'd like this to trigger whenever the drive is plugged in, without needing to enable AutoRun... unless AutoRun can be enable only for specific volumes?

share|improve this question
up vote 0 down vote accepted

You can put an autorun.inf in the root of the drive that calls a .bat that maps the drive via net share. This seems like the easiest solution.

share|improve this answer
What drive letter do I map to the share? The drive letter assigned by the OS changes if other storage devices are plugged in. Can you map via volume id instead? – x-x Jul 12 '10 at 6:30

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.