How to check and set Task Scheduler Log options and path using a script

The following knowledgebase will explain the methods you can use to check the Task Scheduler Log options and path on local and remote computer.

To check on local computer:

You can use the following methods:

  1. Connecting to Remote Registry Service
  2. Using a script

The first method is easy but includes a lot of efforts. You can navigate to the following location in registry after connecting to remote registry:

HKLM\Software\Microsoft\SchedulingAgent

The above registry key includes the following values in right pane:

LogPath REG_EXPAND_SZ %SystemRoot%\SchedLgU.Txt

TasksFolder REG_EXPAND_SZ %SystemRoot%\Tasks

To check on a Remote Computer:

You can use the below script to check the LogPath and Tasks Folder on a remote computer:

@echo off

Srvlist=C:\Temp\Srvlist.txt

Echo Computer Name, Log Path, Tasks Folder >> Result.csv

SET Log_Path=

SET Task_Fold=

For /F “Tokens=*” %%a In (%srvlist%) Do (

Set Comp_name=%%a

Set RegQry=”\\%%a\HKLM\Software\Microsoft\ShcedulingAgent”

REG.exe Query %RegQry% > CheckCC.txt

Find /i "LogPath" < CheckCC.txt > StringCheck.txt

FOR /f “Tokens=3” %%b in (CheckCC.txt) DO SET Log_Path=%%b

Find /i “TasksFolder” < CheckCC.txt > StringCheck.txt

FOR /f “Tokens=3” %%b in (CheckCC.txt) DO SET Task_Fold=%%b

Echo %Comp_name, %Log_Path%, %Task_Fold% >> Result.csv

)

The above script will check remote computer for two registry entries for Log Path and Tasks Folder and the results will be saved in a CSV format file.

Published Thu, Sep 27 2007 3:37 by Nirmal
Filed under:

Comments

# реальное домашнее порно видеоролики

малолетки домашнее видео онлайн http://doggystyle.hostwq.net/  секс частное видео онлайн

http://2sexxx.t35.com/  онлайн молодежное видео как отдыхают русские дома http://russexx.t35.com/

частные сексе фото порно http://megasexx.t35.com/ частные фото на улице http://sexxteens.t35.com/ руссккое домашнее видео онлайн http://teensexlife.t35.com/ порно видео онлайн частное

Saturday, August 15, 2009 7:31 AM by utithantirl

# трахнуть училку картинки

Wednesday, December 09, 2009 1:17 AM by uderweqh

Leave a Comment

(required) 
(required) 
(optional)
(required) 
If you can't read this number refresh your screen
Enter the numbers above: