Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Write Registry using Scheduled Task

Status
Not open for further replies.

Jerz

MIS
Sep 10, 2004
102
US
I am needing to scan dumped event logs daily at 1 A.M. from the previous day. MS has a utility 'eventcombMT' that performs this work based on saved parameters. Here in lies the trouble I'm having. The parameters are saved to/read from HKCU\Software\Microsoft\EventCombMT registry key. I have a script the generates the correct parameters, writes them to the registry, & the runs the app based in the values. It works great when I'm logged on running it. It fails (hangs, actually) when I schedule it as a task, either letting it run while I'm logged on, or letting it run itself at night. The task is set to 'run as' the same user that it works when clicked on. The registry settings do not seem to be getting written when it runs as task. Is HKCU available to scheduled tasks?
 
OK, I guess maybe I wasn't clear. The event logs are already dumped. Unless there is something I'm not understanding about dumpel, it dumps active logs. The logs I need to parse are not active - they are already dumped. But they contain ALL the events. So my script builds the parameters needed by eventcombMT to extract specific events from specific log dump files, and works fine outside of task scheduler. But when run as a scheduled task, it never writes the registry key. I'm going to try using AT & CMD or BAT as the other thread mentioned, but if anyone has any insight concerning registry hives available/not available during scheduled task execution, please clue me in.
 
Hello Jerz,

I have not looked deep into the issue. Scheduled task is run under the credential of local system account. Hence, at the outset, hkcu refers to what? I would say no outright.

regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top