Re: Script launched via AT scheduler won't return from RegRead
- From: "James Whitlow" <jwhitlow@xxxxxxxxxx>
- Date: 24 Jun 2005 16:01:02 -0500
"scattered" <jcoleman@xxxxxxxxxxxxxx> wrote in message
news:1119646172.804573.108300@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> 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
>
Just curious, did you make sure to include the /INTERACTIVE switch in your
AT command?
.
- Follow-Ups:
- Re: Script launched via AT scheduler won't return from RegRead
- From: scattered
- Re: Script launched via AT scheduler won't return from RegRead
- References:
- Script launched via AT scheduler won't return from RegRead
- From: scattered
- Script launched via AT scheduler won't return from RegRead
- Prev by Date: Re: Drive Mapping
- Next by Date: Re: Newbie Common Dialog question
- Previous by thread: Script launched via AT scheduler won't return from RegRead
- Next by thread: Re: Script launched via AT scheduler won't return from RegRead
- Index(es):
Relevant Pages
|
Loading