Re: Script launched via AT scheduler won't return from RegRead



"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?


.



Relevant Pages

  • [ann] another way to call apis from script (the PB way)
    ... a dll and a typelib. ... you run the script, which will interface with a "standard" ... "COMforDLL" will work with a standard dll, ... work with win98 if I manually copied the winXP registry ...
    (microsoft.public.scripting.vbscript)
  • Re: Modify Registry on all SBS2003 clients
    ... registry setting to all workstations. ... command "REG ADD" to modify registry. ... the following command will change the registry value as your ... You may copy above command into the login script file SBS_LOGIN_SCRIPT.bat ...
    (microsoft.public.windows.server.sbs)
  • Re: Modify Registry on all SBS2003 clients
    ... logging on the client computer dont have administrative rights on the ... registry setting to all workstations. ... command "REG ADD" to modify registry. ... and put the command lines at the bottom of the script file. ...
    (microsoft.public.windows.server.sbs)
  • Re: Is there anyway to control the order of in which the [Run] entries are performed in the registry
    ... 3rd-party 'Startup Delayer' program or use a batch script, ... of these entries in the registry. ... Also, as I have also said, the 'Startup Delayer' ... run these commands from a 'Command Prompt' ...
    (microsoft.public.windowsxp.general)
  • Help with Outlook profile script
    ... I would like to have a script that checks if the correct Outlook profile is configured in the users profile. ... Outlook profiles are configured in the following registry key: ...
    (microsoft.public.scripting.vbscript)

Loading