Microsoft Press Windows Vista Administrator's Pocket Consultant ebook

Home > Other > Microsoft Press Windows Vista Administrator's Pocket Consultant ebook > Page 59
Microsoft Press Windows Vista Administrator's Pocket Consultant ebook Page 59

by MS


  Windows Vista has two general types of scheduled tasks:

  Standard tasks Used to automate routine tasks and perform housekeeping. These tasks are visible to users and can be modified if necessary.

  Hidden tasks Used to automate special system tasks. These tasks are hidden from users by default and should not be modified in most cases. Some hidden tasks are created and managed through a related program, such as Windows Defender.

  In Windows Vista, the creation and management of tasks is much more sophisticated than ever before. Every task can be configured to:

  Run only when a user is logged on, or to run regardless of whether a user is logged on

  Run with standard user privileges, or to run with the highest privileges required (including administrator privileges)

  Because tasks created on Windows Vista are not compatible with earlier releases of Windows, you cannot copy a Windows Vista task to a computer running an earlier release of Windows and expect the task to run. However, when creating the task, you can specify that it should be created so that it is compatible with earlier releases of Windows. This would then allow you to copy the task to computers running earlier releases of Windows.

  Tasks can have many properties associated with them, including:

  Triggers Triggers specify the circumstances under which a task begins and ends. You can begin a task based on a schedule, user logon, computer startup, or processor idling. You can also begin a task based on events, a user connecting or disconnecting from the Terminal Server session, or a user locking or unlocking a workstation. Tasks with event-based triggers can be the most powerful, because they allow you to provide automated ways to handle errors and warnings.

  Actions Actions define the action a task performs when it is triggered. This allows a task to start programs, send e-mail messages, and display messages.

  Conditions Conditions help to qualify the conditions under which a task is started or stopped once it has been triggered. You can use conditions to wake the computer to run a task and to start the computer only if a specific network connection is available. You can use conditions to start, stop, and restart a task based on the processor idle time. For example, you might want to start a task only if the computer has been idle for at least 10 minutes, stop the task if the computer is no longer idle, and then restart the task again if the computer becomes idle once more. You can also use conditions to specify a task should only start if the computer is on alternating current (AC) power and stop if the computer switches to battery power.

  Viewing and Managing Tasks on Local and Remote Systems

  The current tasks configured on a system are accessible through the Task Scheduler node in Computer Management. You can view and manage the scheduled tasks configured on a computer by completing the following steps:

  Open Computer Management. You are connected to the local computer by default. If you want to view logs on a remote computer, right-click the Computer Management entry in the console tree (left pane) and then select Connect To Another Computer. Then, in the Select Computer dialog box, enter the name of the computer that you want to access and then click OK.

  Expand the Task Scheduler node and then expand the Task Scheduler Library node and related subnodes as necessary to view the configured schedule tasks.

  Select a task to view its properties using the tabs provided, as shown in Figure 16-3. If you want to manage the task, right-click the task and then:

  q Delete a task by selecting Delete.

  q Disable a task by clicking Disable.

  q Edit the task's properties by clicking Properties, making the appropriate changes in the Properties dialog box, and then clicking OK.

  q Export a task to a file that can be imported on another computer by selecting Export. After you export the task, use Computer Management to connect to the other computer, right-click the Task Scheduler Library node, and then select Import Task. You can then use the Open dialog box to locate and open the task in the other computer.

  q Run the task by clicking Run.

  q If the task is running, stop it by clicking End.

  Figure 16-3: View and manage scheduled tasks.

  Note

  Although you can modify and delete user-created tasks, most tasks created by the operating system cannot be configured or deleted. You can view hidden tasks by clicking View and then selecting Show Hidden Tasks.

  You can view the scheduled tasks currently running on a computer by completing the following steps:

  Open Computer Management. You are connected to the local computer by default. If you want to view logs on a remote computer, right-click the Computer Management entry in the console tree (left pane) and then select Connect To Another Computer. In the Select Computer dialog box, enter the name of the computer that you want to access and then click OK.

  Right-click the Task Scheduler node and then select Display All Running Tasks.

  Creating Tasks with the Scheduled Task Wizard

  To create a task using the Scheduled Task Wizard, follow these steps:

  Open Computer Management. You are connected to the local computer by default. If you want to view logs on a remote computer, right-click the Computer Management entry in the console tree (left pane) and then select Connect To Another Computer. In the Select Computer dialog box, enter the name of the computer that you want to access and then click OK.

  Select and then right-click the Task Scheduler node and then select Create Task. This starts the Create Task Wizard.

  On the General tab, type the name of the task and then set security options for running the task.

  q If the task should run under a user other than the current user, click Change User Or Group. Use the Select Users Or Groups dialog box to select the user or group under which the task should run and then provide the appropriate credentials when prompted later.

  q Set other run options as necessary using the options provided. By default, tasks only run when a user is logged on. If you want to run the task regardless of whether a user is logged on, select Run Whether User Is Logged On Or Not. You can also elect to run with highest privileges and configure the task for earlier releases of Windows.

  q On the Triggers tab, create and manage triggers using the options provided. To create a trigger, click New, use the options provided to configure the trigger, and then click OK.

  q On the Actions tab, create and manage actions using the options provided. To create an action, click New, use the options provided to configure the action, and then click OK.

  q On the Conditions tab, specify any limiting conditions for starting or stopping the task.

  q On the Settings tab, choose any additional optional settings for the task.

  q Click OK to create the task.

  Troubleshooting Scheduled Tasks

  When you configure tasks to run on a computer, you can encounter several types of problems. Some tasks won't run when they are supposed to. Others will start and won't stop. To determine the status of a task, select the task in the Task Scheduler and note the status, last run time, and last run result. If a task has a status of Queued, it is waiting to run at a scheduled time. If a task has a status of Ready, it is ready to run on its next run time. If a task should be running automatically but has a Last Run Time of Never, you'll need to check the task's properties to determine why it isn't running. If the Last Run Result is an error, you'll need to resolve the referenced problem so the task can run normally. Check a task's properties by clicking its entry in the Task Scheduler. The History tab provides detailed information on the task, from creation to its last run time. Use the history information to help you resolve problems with the task.

  A task that is listed as Running might not in fact be running but instead might be a hung process. You can check for hung processes using Last Run Time, which tells you when the task was started. If a task has been running for more than a day, there is usually a problem. A script might be waiting for input, it might have problems reading or writing files,
or it might simply be a runaway task that needs to be stopped. To stop the task, right-click it in the Task Scheduler and then select End.

  Backing Up and Recovering a Computer

  Windows Vista provides Backup And Restore Center as a central console for backing up and recovering a computer. You can access this console by clicking Start, clicking Control Panel, and then clicking the Backup Your Computer link under the System And Maintenance heading. Other tools for backing up and recovering a computer's data include Previous Versions, Startup Repair Tool, Windows Resume Loader, System Restore, and Backup. These tools are discussed in the sections that follow.

  Backing Up and Recovering Files and Folders Using Previous Versions

  Chapter 2 introduced Previous Versions and also discussed configuring and using this feature. Although Previous Versions is not a replacement for full system backups, it can be used to create automatic backups of changed files and folders on monitored drives. If a monitored file or folder was accidentally deleted or modified, you can recover the file or folder to the previous version using the technique discussed in Chapter 2 in the "Restoring a Previous Version" section.

  Recovering from a Failed Resume

  When a computer running Windows Vista enters sleep mode or hibernates, a snapshot of the current state of the computer is created. For sleep mode, this snapshot is created in memory and then read from memory when a user wakes the computer. For hibernate mode, this snapshot is written to disk and then read from disk when a user wakes the computer. Both operations are handled by the Windows Resume Loader.

  Problems with resume can occur for a variety of reasons, including errors in the snapshot, physical errors in memory, and physical disk errors. If there is a problem resuming after waking the computer, Windows Resume Loader will prompt you with a warning message similar to the following:

  Windows Resume Loader

  The last attempt to restart the system from its previous location failed.

  Attempt to restart again?

  Continue with system restart

  Delete restoration data and proceed to system boot.

  Enter=choose

  To have Windows Resume Loader attempt to reload the system state again, select Continue With System Restart. To have Windows Resume Loader delete the saved state of the computer and restart the computer, select Delete Restoration Data And Proceed To System Boot. Although the latter option, a full restart, will typically resolve the problem, it could mean losing data if work wasn't saved before the computer entered sleep or hibernate mode.

  Repairing a Computer to Enable Startup

  To start properly, computers running Windows Vista need access to specific system files. If a computer won't start due to a corrupted or missing system file, you can use the Startup Repair Tool to recover it as discussed in Chapter 3. Sometimes repairing a damaged or missing file won't fix all the computer's problems, and you might need to continue troubleshooting to diagnose and resolve the deeper problem.

  Most other types of startup problems occur because something on the system has changed; for example, a device might have been incorrectly installed. The system configuration or registry might have been updated improperly, causing a conflict. Often you can resolve startup issues using safe mode to recover or troubleshoot system problems. When you are finished using safe mode, be sure to restart the computer using a normal startup. You will then be able to use the computer as you normally would.

  In safe mode, Windows Vista loads only basic files, services, and drivers. The drivers loaded include the mouse, monitor, keyboard, mass storage, and base video. The monitor driver sets the basic settings and modes for the computer's monitor; the base video driver sets the basic options for the computer's graphics card. No networking services or drivers are started unless you choose safe mode With Networking option. Because safe mode loads a limited set of configuration information, it can help you troubleshoot problems.

  Restart a system, in safe mode, by completing the following steps:

  If the computer is running but has started with errors, click Start. Then click the Options button to the right of the power and lock buttons and click Shut Down.

  During startup, press F8 to access the Advanced Options screen. If the computer has multiple operating systems or you've installed the Recovery Console, you'll see the Windows Boot Manager screen and can press F8 at that time.

  Use the arrow keys to select the safe mode you want to use and then press Enter. The safe mode option you use depends on the type of problem you're experiencing. The key options are as follows:

  q Safe Mode Loads only basic files, services, and drivers during the initialization sequence. The drivers loaded include the mouse, monitor, keyboard, mass storage, and base video. No networking services or drivers are started.

  q Safe Mode With Networking Loads basic files, services, and drivers, as well as services and drivers needed to start networking.

  q Safe Mode With Command Prompt Loads basic files, services, and drivers, and then starts a command prompt instead of the Windows Vista graphical interface. No networking services or drivers are started.

  Tip

  In Safe Mode With Command Prompt, you can start the Explorer shell from the command-line interface by pressing Ctrl+Shift+Esc and typing explorer.exe in the New Process window in the File menu of the Task Manager.

  q Enable Boot Logging Allows you to create a record of all startup events in a boot log.

  q Enable Low Resolution Video Allows you to start the system in low-resolution 640 × 480 display mode, which is useful if the system display is set to a mode that can't be used with the current monitor.

  q Last Known Good Configuration Starts the computer in safe mode using registry information that Windows Vista saved at the last shutdown. Only the HKEY_CURRENT_CONFIG (HKCC) hive is loaded. This registry hive stores information about the hardware configuration with which you previously and successfully started the computer.

  q Disable Driver Signature Enforcement Starts the computer in safe mode without enforcing digital signature policy settings for drivers. If a driver with an invalid or missing digital signature is causing startup failure, this will resolve the problem temporarily so you can start the computer and resolve the problem by either getting a new driver or changing the driver signature enforcement settings.

  If a problem doesn't reappear when you start in safe mode, you can eliminate the default settings and basic device drivers as possible causes. If a newly added device or updated driver is causing problems, you can use safe mode to remove the device or reverse the update.

  If you are still having a problem starting the system normally and suspect that problems with hardware, software, or settings are to blame, remain in safe mode and then try using System Restore to undo previous changes. See the "Backing Up and Recovering System State Using System Restore" section of this chapter.

  If System Restore doesn't work, try modifying startup options as discussed in Chapter 2.

  Backing Up and Recovering System State Using System Restore

  The "The System Protection Tab" section in Chapter 2 introduced System Restore and also discussed configuring this feature. Restore points can be used to recover systems that are experiencing problems after a system update, software installation, hardware installation, or other change. The following sections discuss how restore points can be created manually and how systems can be recovered using restore points. Restore operations are reversible in most cases.

  Understanding Restore Points

  System Restore monitors the operating system for changes and creates restore points before changes are introduced at regular daily intervals. The feature works by saving a snapshot of a computer's system configuration and writing this to disk so that it can be used to recover the system to a point in time if necessary. It is important to note that System Restore does not affect personal data. You can recover a system to a restore point without affecting a user's application data, cached files, or documents. System R
estore doesn't write any information to the Documents folder either.

  System Restore tracks and saves configuration information separately for each drive on a computer. This means that each drive has disk space made available to System Restore, and you can turn off monitoring of individual drives as needed. If a drive is configured for System Restore monitoring, you can recover from changes if a problem occurs. If a drive isn't configured for System Restore monitoring, configuration changes are not tracked, and changes cannot be recovered if a problem occurs. On most systems, you should configure System Restore for the system drive, which stores the operating system files, and for all drives containing critical applications.

  Restore points can be restored in one of three ways: by checkpoint, by date, or by event. Individual snapshots scheduled by the operating system are called system checkpoints. When you installed Windows Vista, the first snapshot—the initial system checkpoint—was created automatically. Other system checkpoints are made approximately every 24 hours. If a computer is turned off when a daily checkpoint is scheduled, System Restore creates the checkpoint the next time the computer is started.

  Some snapshots are created automatically based on events that the operating system triggers when you make changes or install applications. For simplicity, I call these snapshots "installation restore points," and there's actually a group of them, each with a different purpose. The event-based snapshots are as follows:

  Program name installation restore points Created prior to installing a program that uses a compatible installer. You can use installation restore points to track application installation and to restore a computer to the state it was in before the application was installed. Restoring the computer state means that all file and registry settings for the installed program are removed. It also means that programs and system files altered by the installation are restored to their previous state. Once completed, the program won't work and you'll need to reinstall it if the user wants to use it again.

 

‹ Prev