Script launched via AT scheduler won't return from RegRead
- From: "scattered" <jcoleman@xxxxxxxxxxxxxx>
- Date: 24 Jun 2005 13:49:32 -0700
Greetings,
I have the following script (Alarm.vbs):
Set ws = WScript.CreateObject("WScript.Shell")
Do While ws.RegRead("HKCU\Software\AlarmClock\Status") = "On"
ws.Run "%comspec% /c echo " & Chr(07), 0, True 'beep!
WScript.sleep 1000
Loop
I have another script that sets the Registry value Status to "On" and
schedules Alarm.vbs to run at a given time and another Script which
sets the value to Off. Everything seems like it should work. I am
correctly setting the registry values and, Alarm.vbs works correctly if
called from the command line (if the registry value is on then it beeps
until the other script turns it off). However, when I try to AT
schedule Alarm.vbs, it *is* triggered at the appropriate time, as I
verified by putting a beep statement as the first line of the script,
but it seems to never return from the call to RegRead. On the task
manager I can tell that the scripts are still running in the
background.
What gives? Why should being launched from the scheduler affect the
script's ability to read the registry?
Thank you for your time.
-John Coleman
.
- Follow-Ups:
- Re: Script launched via AT scheduler won't return from RegRead
- From: James Whitlow
- Re: Script launched via AT scheduler won't return from RegRead
- Prev by Date: Re: Make SQL connection with Windows Auth?
- Next by Date: Re: Drive Mapping
- Previous by thread: is there any kind of vbs code for this??
- Next by thread: Re: Script launched via AT scheduler won't return from RegRead
- Index(es):
Relevant Pages
|