Western Digital "My Book" - Questions

  • Thread starter andreas.keppler
  • Start date
M

Mike Redrobe

[etc]

wow! massively over engineered script when the
following *single line* directly in scheduled tasks
"run box" would do the same:

echo "This is a dummy file" > G:\dummyfile.txt

(or put the same line in a nostandby.bat file)
 
B

bxf

Andreas said:
-------------
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
----------------


This script doesnt run here even if I change your drive "M" to "G".
(my mybook is "G")


I saved the script as "nostandby.vbs" and created a scheduled Task.

Every time XP starts the script, XP says that it couldnt execute the
script cause of entering the wrong password or Username!
(but the password I used is the same I need for logging into XP!)

If I dont provide a password and start the script XP complains about
not using a password in the scheduled task! :)

I think I've seen some fix or update related to this - can't recall
where. You'll have to search yourself.
Maybe it was wrong that I used the extension .vbs!

vbs is correct.
 
B

bxf

Believe it or not, I'm an excellent technical programmer :) - been
doing it for over 35 years, over 25 of them as a freelancing
contractor.

Problem is, it's all been on mainframes, so when I want to do something
on a PC, I'm limited. In this case, my logic says that I want to write
a record to a file, so let me find examples of how this is done. And
you see the results. At least it works.

Having knowledge of the features of a given language always helps, but
one only picks up these things through experience. In fact, I've told
myself several times that I should make an effort to learn, and in the
past I've always found that the best way for me to learn is to write
something simple, then repeatedly expand on it, often using some
additional features of the language. Unfortunatelty, I can't think of
anything to write that would be useful enough to keep me motivated.

Bill

Mike said:
[etc]

wow! massively over engineered script when the
following *single line* directly in scheduled tasks
"run box" would do the same:

echo "This is a dummy file" > G:\dummyfile.txt

(or put the same line in a nostandby.bat file)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top