Microsoft Press Windows Vista Administrator's Pocket Consultant ebook

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

by MS


  Logon and startup scripts should run simultaneously (in most cases).

  All scripts should be hidden rather than visible.

  The system should wait no more than one minute for a script to complete (in most cases).

  To enforce this behavior, follow these steps:

  Access Group Policy for the computer you want to work with. Next, access Computer ConfigurationAdministrative TemplatesSystemScripts.

  Double-click Run Logon Scripts Synchronously. On the Setting tab, select Disabled.

  Double-click Run Startup Scripts Asynchronously. On the Setting tab, select Enabled.

  Double-click Run Startup Scripts Visible. On the Setting tab, select Disabled.

  Double-click Run Shutdown Scripts Visible. On the Setting tab, select Disabled.

  Double-click Maximum Wait Time For Group Policy Scripts. On the Setting tab, select Enabled and then enter a value of 600 for the wait time in the Seconds field, as shown in Figure 8-8. Click OK.

  Figure 8-8: Set the maximum wait time for scripts.

  Access User ConfigurationAdministrative TemplatesSystemScripts.

  Double-click Run Legacy Logon Scripts Hidden. On the Setting tab, select Enabled.

  Double-click Run Logon Scripts Visible. On the Setting tab, select Disabled.

  Double-click Run Logoff Scripts Visible. On the Setting tab, select Disabled and then click OK to complete the configuration process for scripts.

  Assigning Computer Startup and Shutdown Scripts

  Computer startup and shutdown scripts can be assigned as part of a group policy. In this way, a computer and all its users—or all computers that are members of the site, domain, or OU—execute scripts automatically when they're started or shut down.

  To assign computer scripts, follow these steps:

  For easy management, copy the scripts you want to use to the ScriptsStartup or ScriptsShutdown folder for the related policy. Scripts are stored in the %System-Root%SysvolSysvol %UserDnsDomain%Policies GUIDMachine folder on domain controllers and %SystemRoot%System32GroupPolicyMachine on Windows Vista workstations.

  Access the Group Policy console for the resource you want to work with. Then access Computer ConfigurationWindows SettingsScripts.

  To work with startup scripts, right-click Startup and then select Properties. To work with shutdown scripts, right-click Shutdown and then select Properties. This opens a dialog box similar to the one shown in Figure 8-9.

  Figure 8-9: Manage computer startup scripts using the Startup Properties dialog box.

  Click Show Files. If you copied the computer script to the correct location, you should see the script.

  Click Add to assign a script. This opens the Add A Script dialog box. In the Script Name field, type the name of the script you copied to the ScriptsStartup or the ScriptsShutdown folder for the related policy. In the Script Parameters field, enter any command-line arguments to pass to the command-line script or parameters to pass to the scripting host for a WSH script. Repeat this step to add other scripts.

  During startup or shutdown, scripts are executed in the order in which they're listed in the Properties dialog box. Click Up or Down to reposition scripts as necessary.

  If you want to edit the script name or parameters later, select the script in the Script For list and then click Edit.

  To delete a script, select the script in the Script For list and then click Remove.

  Assigning User Logon and Logoff Scripts

  User scripts can be assigned as part of a group policy. In this way, all users who access a computer or are members of the site, domain, or OU execute scripts automatically when they log on or log off.

  To assign user scripts, complete the following steps:

  For easy management, copy the scripts you want to use to the ScriptsLogon or the ScriptsLogoff folder for the related policy. User scripts are stored in the %SystemRoot%SysvolSysvol %UserDnsDomain%Policies GUIDUser folder on domain controllers and %WinDirSystemRoot%System32GroupPolicyUser on Windows Vista workstations.

  Access the Group Policy console for the resource you want to work with. Then access User ConfigurationWindows SettingsScripts.

  To work with logon scripts, right-click Logon and then select Properties. To work with logoff scripts, right-click Logoff and then select Properties. This opens a dialog box similar to the one shown in Figure 8-10.

  Figure 8-10: Manage user logon scripts using the Logon Properties dialog box.

  Click Show Files. If you copied the user script to the correct location, you should see the script.

  Click Add to assign a script. This opens the Add A Script dialog box. In the Script Name field, type the name of the script you copied to the ScriptsLogon or the ScriptsLogoff folder for the related policy. In the Script Parameter field, enter any command-line arguments to pass to the command-line script or parameters to pass to the scripting host for a WSH script. Repeat this step to add other scripts.

  During logon or logoff, scripts are executed in the order in which they're listed in the Properties dialog box. Click Up or Down to reposition scripts as necessary.

  If you want to edit the script name or parameters later, select the script in the Script For list and then click Edit.

  To delete a script, select the script in the Script For list and then click Remove.

  Working with Logon and Startup Policies

  Windows Vista provides a set of policies to control the logon process, some of which allow you to configure the way programs run at logon. This makes them similar to logon scripts, in that you can execute specific tasks at logon. Other policies change the view in the welcome and logon screens. The main logon and startup policies that you'll use are available at Administrative TemplatesSystemLogon and are summarized in Table 8-5.

  Table 8-5: Logon and Startup Policies

  Policy Type

  Policy Name

  Description

  Computer

  Always Use Classic Logon

  This overrides the default simple logon screen and uses the logon screen from previous versions of Windows.

  Computer

  Always Wait For The Network At Computer Startup And Logon

  Requires the computer to wait for the network to be fully initialized. At startup, this Group Policy is fully applied rather than using a background refresh. At logon, this means the user account cannot be authenticated against cached credentials and must be authenticated against a domain controller.

  Computer

  Don't Display The Getting Started Welcome Screen At Logon

  Hides the welcome screen that is displayed when new users log on. This only applies to Windows Vista and not to servers.

  Computer/User

  Do Not Process The Legacy Run List

  Disables running startup applications other than those set through System Policy Editor in Windows NT 4.

  Computer/User

  Do Not Process The Run-Once List

  Forces the system to ignore customized run-once lists.

  Computer/User

  Run These Programs At User Logon

  Sets programs that all users should run at logon. Use the full file path (unless program is in %SystemRoot%).

  Hiding the Welcome Screen

  Experienced users often find the welcome screen annoying, particularly because it is displayed automatically every time they log on to a new computer. To hide the welcome screen at logon, follow these steps:

  Access Group Policy for the computer you want to work with. Next, access Computer ConfigurationAdministrative TemplatesSystemLogon.

  Double-click Don't Display The Getting Started Welcome Screen At Logon. On the Setting tab, select Enabled and then click OK.

  Using Classic Logon vs. Simple Logon

  The simple logon window is new in Windows Vista. It is the default authentication, and although that view can be useful, some users might prefer to see only the classic logon window. To use classic logon rather than simple l
ogon, follow these steps:

  Access Group Policy for the computer you want to work with. Next, access Computer ConfigurationAdministrative TemplatesSystemLogon.

  Double-click Always Use Classic Logon. On the Setting tab, select Enabled and then click OK.

  Note

  For more details, see the "Controlling Logon: Welcome Screens and Classic Logons" section of Chapter 6, "Managing User Access and Security."

  Setting Policy-Based Startup Programs

  Although users can configure their startup applications separately, it usually makes more sense to handle this through policy, especially in an enterprise in which the same applications should be started by groups of users. To specify programs that should start at logon, follow these steps:

  Access Group Policy for the computer you want to work with. Next, access Computer ConfigurationAdministrative TemplatesSystemLogon.

  Double-click Run These Programs At User Logon. On the Setting tab, select Enabled.

  To assign startup applications through policy, click Show. In the Show Contents dialog box, specify applications according to their full file or UNC path, such as D:Program FilesInternet ExplorerIEXPLORE.EXE or \DCServ01AppsSTATS.EXE.

  Close all open dialog boxes.

  Disabling Run Lists Through Policy

  Using policy, you can disable legacy run lists as well as run-once lists. Legacy run lists are stored in the registry in

  HKEY_LOCAL_MACHINE

  SOFTWARE

  Microsoft

  Windows

  CurrentVersion

  Run

  and

  HKEY_CURRENT_USER

  Software

  Microsoft

  Windows

  CurrentVersion

  Run

  Run-once lists can be created by administrators to specify programs that should run the next time the system starts but not on subsequent restarts. Run-once lists are stored in the registry under

  HKEY_LOCAL_MACHINE

  SOFTWARE

  Microsoft

  Windows

  CurrentVersion

  RunOnce

  To disable run lists, follow these steps:

  Access Group Policy for the computer you want to work with. Next, access Computer ConfigurationAdministrative TemplatesSystemLogon or User ConfigurationAdministrative TemplatesSystemLogon.

  Double-click Do Not Process The Run Once List. On the Setting tab, select Enabled. Click OK.

  Double-click Do Not Process The Legacy Run List. On the Setting tab, select Enabled and then click OK.

  Chapter 9: Managing Disk Drives and File Systems

  Most computers have several types of drives, including physical drives and removable media drives. A hard disk drive is the typical primary storage device. In most cases, the first hard disk drive installed is designated as Disk 0. If additional hard disk drives are installed, they are designated as Disk 1, Disk 2, and so on. This chapter discusses tools and techniques for managing disk drives and file systems. You'll learn how to partition, format, and convert disks from one disk type to another. You'll also learn about Microsoft Windows Vista features that affect how drivers are used, including Windows ReadyBoost, Windows ReadyDrive, and Windows SuperFetch.

  Disk Management Essentials

  Windows Vista enables you to designate a physical drive as either a basic disk or a dynamic disk.

  Basic disks The historically available disk type, a basic disk can, on Windows

  Vista, be divided into one or more partitions. A partition is a logical section of a disk that operates as if it were a physically separate disk. To use a partition, you must format it for a particular file system (FAT, FAT32, or NTFS) and assign it a drive designator. The formatted partition is then referred to as a basic volume, and you can access it as a local disk on the computer. Windows Vista supports both primary and extended partitions on basic disks. A primary partition is used to start the operating system. You access a primary partition directly by its drive designator. You cannot subdivide a primary partition. An extended partition, on the other hand, is accessed indirectly. After you create an extended partition, you must divide it into one or more logical drives. You can then access the logical drives independently of each other.

  Dynamic disks Introduced with Microsoft Windows 2000, these disks enable you to perform most common disk maintenance tasks without having to restart the computer. Like a basic disk, a dynamic disk can be divided. However, dynamic disks are divided into volumes rather than partitions. A volume is very similar to a partition. The most commonly used type of volume is a simple volume. A simple volume is a volume on a single disk, which can be used to start the operating system and for general data storage. Other types of volumes can be used as well, including those that enable you to extend a single volume across several disks (a spanned volume). As with a partition or a logical drive, you must format a volume on a dynamic disk and assign it a drive designator before you can use it. The formatted volume is referred to as a dynamic volume, and you can access it as a local disk on the computer. When a dynamic volume combines space from multiple physical drives, it will still appear as a single local disk, accessed by a single drive designator.

  Windows Vista provides several tools for working with a computer's disks. The first and most often overlooked is the Computer console. Other tools include Disk Management, FSUtil, and DiskPart.

  Using the Computer Console

  To access the Computer console, click Start and select Computer. You can use the Computer console to quickly determine the available storage devices on a computer. As Figure 9-1 shows, the Computer console provides the following details:

  Hard Disk Drives Lists the local disks available on the computer. Right-click a disk to display available management options, including Explore, which opens the disk in Windows Explorer with a complete Folders view. Explore is much more convenient than Open, which opens the disk in Windows Explorer but doesn't display a complete Folders view.

  Devices With Removable Storage Lists the removable storage devices on the computer, including CD, DVD, and floppy disk drives. Right-click a device to display available management options, including Eject, which is convenient for ejecting current media so that new media can be inserted.

  Tip

  Universal serial bus (USB) flash drives and FireWire/USB-attached external hard drives are being used more and more in place of floppies and other types of removable media. If a computer has a USB or FireWire port, you can easily connect or disconnect a drive. Before you disconnect a USB or FireWire drive, you should ensure that it is in a safe state. The Safely Remove option provides one way to do this. Right-click the disk designator in Windows Explorer or any related view, such as the Devices With Removable Storage list, and then select either Eject or Safely Remove. As long as files on the drive are not in use, you should then be able to safely disconnect the drive.

  Network Location Lists any available network drives. A network drive provides access to a shared folder or a disk on another computer. You can connect network drives by right-clicking Computer on the Start menu and choosing Map Network Drive to start the Map Network Drive Wizard. To disconnect a network drive, right-click Computer on the Start menu and choose Disconnect Network Drive to open the Disconnect Network Drive dialog box.

  Figure 9-1: The Computer console provides easy access to a computer's storage devices.

  Using Disk Management

  When you want to configure drives, the tool of choice is Disk Management. Disk Management provides the tools you need to manage disks, partitions, volumes, logical drives, and their related file systems. Disk Management is a Microsoft Management Console (MMC) snap-in that can be accessed through a preconfigured console or added to any custom console you've created. Using Disk Management, you'll be able to perform the following tasks:

  Determine the capacity, free space, status, and other properties of disks.

  Create partitions and logical drives on basic disks.


  Create volumes on dynamic disks.

  Extend volumes to increase their size or to span multiple disks.

  Format volumes and specify the file system to use as FAT, FAT32, or NTFS.

  Assign drive letters and paths to volumes.

  Convert basic disks to dynamic disks and vice versa.

  You can start Disk Management at an elevated command prompt by typing diskmgmt.msc. Alternatively, right-click Computer on the Start menu, choose Manage to start Computer Management, and then select Disk Management in the left pane of the Computer Management window.

  When you start Disk Management, you're automatically connected to the local computer. To examine drives on another computer, right-click the Computer Management entry in the console tree and select Connect To Another Computer on the shortcut menu. You can now choose the system whose drives you want to examine. From the command line, you can connect to another computer when starting Computer Management by typing compmgmt.msc/computer= ComputerName, where Computer-Name is the name of the remote computer to which you want to connect.

  In the default configuration, shown in Figure 9-2, Disk Management displays the Volume List view in its upper panel and the Graphical view in its lower panel. Although only two views can be shown at any one time, three views are available.

  Figure 9-2: Use Disk Management to manage disk configurations.

  Volume List view Provides a detailed summary of all the drives on the computer. Clicking a column label, such as Layout or Status, allows you to sort the disk information based on that column.

  Graphical view Provides a graphical overview of all the physical and logical drives available. Summary information for the physical disk devices includes the disk number and device type, such as basic, removable, or CD-ROM; the disk capacity; and the status of the disk device, such as online or offline. Additional details are also provided for each local disk on the physical disk, including the drive letter and text label for the associated partition or volume; the file system type, such as FAT, FAT32, or NTFS; the size of the drive section in megabytes (MB); and the local disk status, such as healthy or unhealthy.

 

‹ Prev