Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


November 2001

Simplify Win2K Desktop Deployment


RSS
Subscribe to Windows IT Pro | See More Windows 2000 Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

Next, the script adds the NT 4.0 domain global group to the Administrators local group on the computer. For this task, the script first uses Active Directory Service Interfaces (ADSI) to connect to the SAM database on the local computer. The script creates the oGroup object by using ADSI's GetObject() function to bind to ADSI's WinNT provider. After establishing the connection with the WinNT provider, the script uses the oGroup object's IsMember method to verify that the domain global group (GLOBAL_GROUP) is a member of the Administrator local group. If the global group isn't a member of the local group, the value of the sMember variable is FALSE (0) and the script uses the oGroup.Add method to add the global group to the local group. The script rechecks the value of sMember to ensure that it's TRUE (-1), then uses the oWshShell.Popup method to display a status message and continues running after a 5-second pause.

We use SMS, so the last thing the script does is install the SMS client software on the computer. After displaying an informational message, the script uses the oWshNet.MapNetworkDrive method to map the computer's N drive to the SMS server and the oWshShell.Run method to start smsman.exe. When smsman.exe has finished, the script disconnects the network drive and displays a final message.

Prepare the Disk Image
After you've created the master disk image, you use the Sysprep utility to prepare it for duplication. The Sysprep utility comprises three files: sysprep.exe, setupcl.exe, and sysprep.inf. Sysprep.exe prepares the disk for cloning and runs setupcl.exe, which generates a unique SID on the cloned image. You can use the optional sysprep.inf file to automate Sysprep's Mini-Setup Wizard process. During the first boot after cloning, the Mini-Setup Wizard will prompt you for any information sysprep.inf doesn't provide, such as computer name, time zone, and domain membership.

Sysprep also lets you copy a disk image to a computer that has a compatible hardware abstraction layer (HAL) but different hardware from the system that provided the image. The image must contain any drivers not in the C:\winnt\driver cache\i386\driver.cab file, and sysprep.inf's [UNATTENDED] section must specify the location of the additional drivers.

You can find a version of Sysprep on the Win2K Pro CD-ROM under \support\tools\deploy.cab, but a newer version is available at the Microsoft Web site at http://www.microsoft.com/windows2000/techinfo/planning/incremental/sysprep11.asp. Download the white paper "Automating Windows 2000 Deployments with Sysprep," and read it before getting started. Appendix B of this white paper contains the commands you need to create sysprep.inf, and "Microsoft Windows 2000 Guide to Unattended Setup" (unattended.doc), in the \deploy.cab folder on the Win2K Pro CD-ROM, provides information about the syntax of the commands.

Listing 2, page 44, shows the sysprep.inf file I created. Let's look at each section and the actions that it tells the Mini-Setup Wizard to perform.

[Unattended]. In the [Unattended] section, the OemPreInstall = no line indicates that you'll use a cloned disk rather than an unattended setup. OemSkipEula = yes suppresses the display of the End User License Agreement (EULA). KeepPageFile = 0 causes Win2K to regenerate the computer's pagefile to accommodate any difference in RAM between the master computer and the target computer. ExtendOemPartition = 1 extends the system partition to fill the remaining space on the disk. Another option is to expand the partition by an amount you specify in megabytes (e.g., ExtendOemPartition = 75), leaving the unused disk space available for additional partitions. The Extend OemPartition feature works only on NTFS partitions.

A parameter that I didn't use but that's worth mentioning is OemPnPDriversPath, which lets you add drivers not in the C:\winnt\driver cache\i386\driver.cab file. When the Mini-Setup Wizard detects new hardware on the target computer during installation, the wizard searches for the appropriate drivers in the driver.cab file, then, if necessary, in the location that the OemPnPDriversPath parameter specifies.

[GuiUnattended]. In the [GuiUnattended] section, OemSkipWelcome = 1 suppresses the display of the Welcome screen. AdminPassword = elyod[ sets the local Administrator password on the computer to the companywide standard password (elyod[) used for all NT systems. TimeZone = 035 sets the correct time zone for the computer (035 represents Eastern time). The unattended.doc file contains a table of the time zone codes. OemSkipRegional = 1 ensures that you're prompted for any regional information.

[GuiRunOnce]. The [GuiRunOnce] section causes the system to run commands after the Mini-Setup Wizard finishes by adding them to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce subkey. In this case, command01 = c:\winnt\system32\finalsetup.vbs runs the script I created to finish the setup process.

[UserData]. In the [UserData] section, OrgName = "XYZ Communications" sets the company name and FullName = "XYZ User" sets the username. Enclose the names in quotes if they contain spaces, and use the same username for all computers. If you leave these parameters blank, Mini-Setup Wizard prompts the user for the names. Likewise, if the ComputerName parameter is missing (as it is here) or empty, the Mini-Setup Wizard will prompt the user for the name. If you set the ComputerName value to *, the Mini-Setup Wizard will generate a random computer name.

[Identification]. In the [Identification] section, JoinDomain = GONDOR automatically adds the computer to the NT domain GONDOR. You must supply a username in DomainAdmin = and a password with sufficient rights in DomainAdminPassword = to add computers to the domain. I created the domain user account desktop and gave it the Add Workstations to Domain right.

   Previous  1  2  [3]  4  Next 


Top Viewed ArticlesView all articles
CES 2009: Ballmer Announces Windows 7, Windows Live, Live Search Milestones

During his first-ever Consumer Electronics Show (CES) 2009 keynote address last night in Las Vegas, Microsoft CEO Steve Ballmer announced the pending public availability of a feature-complete Windows 7, the final version of Windows Live Essentials, and ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

10 Reasons to Deploy Windows Vista

The decision to upgrade your XP systems to Vista is simple when you consider features such as easier backup, a great desktop search, and vastly improved security options. ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Cloud Computing Forum: Integrating Software, Server and Storage as a Service into Your Enterprise IT Delivery Model

Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2009 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing