Thursday, January 24, 2008

Western Digital My Book Studio Edition

WARNING: Technical Post

If you own this external harddrive or any external harddrive and you do not want it to go into standby/sleep mode continue reading. If you don't own an external harddrive then skip this post. The reason I'm posting these instructions to my blog is because there's not much on the web for this type of problem, or this drive, and we all know how frustrating that can be. Use this fix at your own risk!! I have this script running on Windows Vista. The Western Digital My Book Studio Edition is sold as a MAC drive but you can format it and install it on any windows PC.

First off, if you don't already own this particular drive I would suggest NOT buying it. If you do already own it then you probably know that it has a bug so that when it spins down it simply will not wake up, making it fairly useless for backup jobs, or anytime you want to access it quickly. I have to hold the power button for about four seconds to shut it down, wait a few seconds, and then turn it back on again. Windows goes through the "auto play" feature and I'm able to see it again. Pain in the butt! I only have to do this if it's gone into a deep sleep, if it's only a semi sleep then it will still be recognized but it takes quite a few seconds before you can access it and sometimes it will just hang and you are then forced to do the power off/on thing.

I've checked many forums and it doesn't seem to matter if you are running this drive with a MAC or Windows PC. It also doesn't matter if you have it hooked up eSata, Firewire, or USB. It's obvious Western Digital needs to send out a firmware update but they are not saying/doing anything (even though they are well aware of the problem).

Below I have shown you how to create a script to keep the drive awake or you can simply download the script from here. After downloading and saving it, you must place it on the drive you want to keep awake, you then create a shortcut to the script and place the shortcut in your windows startup folder so the script will run automatically when you start your computer. If you don't restart right away, remember to double click the script to run it!

If you want to create the script yourself continue reading below. This probably isn't the best fix but it certainly helps, hopefully Western Digital will get their butts in gear and get a firmware update out there!


How to Create the Script:
Create a folder on the drive that you want to keep awake. In my case this is Drive G, yours may be different. I have my drive partitioned into three but only need the script on one partition. Name this folder whatever you like.
Inside the folder create a new text document and name it: script You will have to have your extensions showing so you should have a text document named: script.txt when you're done.
Open script.txt and copy and paste the words below into the text document. Anything between ***** doesn't matter but it's good to keep it with the script so you know what it is.


'***********************************************************
' The purpose of this script is to keep external hard
' drives awake which would otherwise turn off after their
' 5 minute timers detect no disk activity.
' To use, simply place this script on the hard disk
' you want to keep awake, e.g. in a sub folder.
' Double-Click to run the script, there is no GUI.
' A file will appear that has the same name as the script
' with the extension "-timestamp.txt" appended.
' This script writes to this text file every 4 minutes
' Simply create a shortcut to this script in your
' startup folder so that it runs everytime your PC boots.
' Advanced technically minded users have proven good
' results can be achieved with SrvAny.exe and InstSrv.exe
' from the Microsoft Resource Kit, to create this as
' a service.
' This script is in the Public Domain 2006
'***********************************************************
Const ForWriting = 2
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Function WriteToFile
Set f = fso.OpenTextFile( Wscript.ScriptFullName & "-timestamp.txt", ForWriting, True)
f.Write Now
f.Close
End Function
Do
WriteToFile
Wscript.Sleep (240000)
Loop



Save the text document and then close it. Right click the document and change the last three extension letters from .txt to .vbs It should now be: script.vbs Double click the script and you should see another file show up in the same folder with the name script.vbs-timestamp.txt If you see that file then you know the script is working.
IMPORTANT: Create a shortcut to the script and place the shortcut in your windows startup folder so the script will run automatically when you start your computer. That's it you're done! You now have a very small script running and this should keep the sleepy harddrive awake.
Update: Do you have a Western Digital Passport drive? Check out my tutorial for what you can do with it!

9 comments:

Anonymous said...

Fantastic script; happy to find it. I've been searching for over a year for something like this. My situation is somewhat different, but this solve the issue. I just needed to keep a second internal drive awake, as it took much too long to spin up. Thanks much for posting it. Bryan.

Anonymous said...

It is nice to know you made sombody's day happy.

Anonymous said...

I use a Mac with this drive and experience the same issue.
But WD just released a firmware update on their site (Feb 08)
I am a little nervous about installing it but the sleep off bug is such a pain, it has to be fixed.

Anonymous said...

Thank you!

Just what I needed!

Anonymous said...

Great post. Thanks! Last thing we need is for some poorly written WD firmware to kill our drives. Great ingenuity. Simple is always best :-)

Anonymous said...

Great post! I was experiencing this issue on a server where backups were failing because the drives kept sleeping. I wrote a basic script in batch to do the same thing yours is doing. The difference is that I called my script as a scheduled task that is run as the administrator. The other difference is that I was running it every 15 minutes and it didn't keep the drive awake. Based upon your script I have now altered the script to run every 3 minutes. I hope this works. Thanks for your post!

Anonymous said...

Hello, i have another question and because you already used this MyBook i can probably as you...how do you set up this harddrive on windows vista?

KansasA said...

Hi Benni, it's been a long while since I hooked it up but from what I remember I connected the drive to my laptop. I then went into "start/control panel/computer management. Under storage click disk management. You should see the drive in the list. I do believe it will asked you to initialize it and you're good to go for windows vista :) Hope this helps.

Almark said...

kind you kindly, wd does have a firmware update, but I couldn't get it to work.