0

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?

4 Answers 4

1

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.

3
  • 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
    Commented Jan 30, 2010 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? Commented Jan 30, 2010 at 22:09
  • Interesting approach. +1.
    – user1931
    Commented Jan 30, 2010 at 23:34
0

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

1
  • 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
    Commented Jan 31, 2010 at 17:01
0

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

1
  • 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
    Commented Jan 31, 2010 at 10:57
0

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

You must log in to answer this question.

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