Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After using USBDLM to ensure my external USB hard drive is set to 'i' on my Windows XP PC (as detailed in this question), now every time I reboot, I have to re-share it so it can be seen on my network. Before, it would always be shared but the drive letter would keep changing (hence having to use USBDLM)

Is there a way to keep my external hard drive shared permanently?

share|improve this question
add comment

4 Answers

I have no experience with this software, but my guess would be that you can create a script to do this.

Copy the following in to a new notepad window:

net share xxxxxxx=c: /remark:"yyyy"

Replace yyyy with whatever you want the comment to be, xxxxxxx with the name of the share and c: with the drive letter.

Save this file somewhere out the way with the extension .bat or .cmd

Next, go to task scheduler and set a new task for login and choose the file you just created.

I have never used USBDLM before, but if it runs under the context of your user, you may want to delay the start of this as it may run before USBDLM has done its stuff.

If you need help with task scheduler, please say and I will write it up.

share|improve this answer
    
Thanks for the suggestion - it certainly sounds like a good possibility but it would mean it takes a few minutes after each reboot while the folders are shared again on the hard drive. I was hoping there was a way to do it so it simply stays shared like it used to. –  andygrunt Jan 30 '10 at 21:56
    
You may be able to do this at login, or even at computer start... I have never used USBDLM and have no idea at what time it kicks in. Perhaps an option would be to create a script that launches USBDLM then does the share command straight after and launch this at computer startup via a scheduled task? –  William Hilsum Jan 30 '10 at 22:09
    
Interesting approach. +1. –  John T Jan 30 '10 at 23:34
add comment

Sorry, I did not check the result of my posting. The format was destroyed...

It should look like this:

[OnArrival10]
Letter=I
open=net share xxxxxxx=i: /remark:"yyyy"

Uwe

share|improve this answer
    
I tried that new format but it still didn't work for me. I noticed the second line replicates the line I've already got in the [DriveLetters] section so I tried commenting those two lines out (i.e. the '[DriveLetters]' and 'Letter=I' lines) but it still didn't work so I've added them back. By the way, can I suggest you edit your original post with the new formatting (I don't have enough Reputation score to do it myself) - then, if/when it works, I'll be able to mark it as the definitive answer whereas at the moment the information is split over two answers. –  andygrunt Jan 31 '10 at 17:01
add comment

Just let USBDLM do it fou you.

[OnArrival10]
Letter=I
open=net share xxxxxxx=i: /remark:"yyyy"

Letter=I is a criteria in OnArrival sections. The OnArrival sections are executed by default on user logon in the user's context.

Uwe Sieber

share|improve this answer
    
Thanks - yes, I'd much prefer USBDLM to do the work rather than having to run a scheduled task. I added the line: [OnArrival10] Letter=I open=net share I=i: /remark:"250Mb Hard Disk" to the end of the USBDLM.ini file (I assume that's where it should go) and it didn't do anything. As a check, I manually ran the batch file suggested by Wil (with the line: net share I=i: /remark:"250Mb i Drive") to check the command was good and that shared my 'i' drive fine. So, am I putting the line in the right file? Is it in the right place in the file and should it replace an existing line? –  andygrunt Jan 31 '10 at 10:57
add comment

I should works as shown in the sample, the position in the file in not important.
Does ListUsbDrives show section [OnArrival10] in the "Sections" line for the I: drive?

Do you see a console window poping up for a moment when the drive is attached or on startup?


Uwe

share|improve this answer
add comment

Your Answer

 
discard

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.