Western Digital "My Book" - Questions
bxf wrote:
bxf wrote:
Andreas Keppler wrote:
"bxf" wrote:
I've just done the above, and my dummy script is in fact an empty file
I've named Dummy Access.bat. The only unpleasant side-effect is the
flashing of the Command Prompt screen every time the task is executed.
There may be a way to prevent this, but I don't know of one yet.
It appears that if you give your empty file a VBS extension rather than
.BAT, there is no "flashing Command Prompt" screen.
It appears that executing an empty script, even if it resides on the
USB drive, does not prevent it from spinning down after a few minutes.
I assume Windows must be caching the script or something, hence
avoiding an actual access to the drive.
I'm going to create a script that will allocate and write to a file on
the drive ("M" in my case), and it looks like this:
Option Explicit
Dim objFSO, objUSBFile
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objUSBFile = objFSO.CreateTextFile("M:\Dummy Access.txt", True)
objUSBFile.WriteLine("This is a dummy file")
objUSBFile.Close
Wscript.Quit
I'll create a Scheduled Task that will invoke this script every few
minutes, and I expect this should keep the drive active. I'll try it
tomorrow.
|