Customizing the default installation script requires nothing more than a few simple edits, which you can do without...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
any real programming.
The techniques you're about to learn involve inserting or modifying a command and then saving the changes, are pretty safe. Even so, it's a good idea to make a backup copy of the default script in case you accidentally make a mistake within the script.
Here again is the default script from the previous article, Turning a standard RIS installation into a scripted installation.
[data] floppyless = "1" msdosinitiated = "1" OriSrc = "\\%SERVERNAME%\RemInst\%INSTALLPATH%\%MACHINETYPE%" OriTyp = "4" LocalSourceOnCD = 1 DisableAdminAccountOnDomainJoin = 1
[SetupData] OsLoadOptions = "/noguiboot /fastdetect" SetupSourceDevice = "\:Device\LanmanRedirector\%SERVERNAME%\RemInst\%INSTALLPATH%"
[Unattended] OemPreinstall = no FileSystem = LeaveAlone ExtendOEMPartition = 0 TargetPath = \WINDOWS OemSkipEula = yes InstallFilesPath = "\\%SERVERNAME%\RemInst\%INSTALLPATH%\%MACHINETYPE%" LegacyNIC = 1
[UserData] FullName = "%USERFIRSTNAME% %USERLASTNAME%" OrgName = "%ORGNAME%" ComputerName = %MACHINENAME%
[GuiUnattended] OemSkipWelcome = 1 OemSkipRegional = 1 TimeZone = %TIMEZONE% AdminPassword = "*"
[Display] BitsPerPel = 16 XResolution = 800 YResolution = 600 VRefresh = 60
[Identification] JoinDomain = %MACHINEDOMAIN% DoOldStyleDomainJoin = Yes
[RemoteInstall] Repartition = Yes UseWholeDisk = Yes
[OSChooser] Description = "Windows Professional"
Help = "This will install Windows Professional in a standard configuration." LaunchFile = "%INSTALLPATH%\%MACHINETYPE%\templates\startrom.com" ImageType = "Flat"
The first change I recommend making to the script is configuring it to automatically provide a product key to the Setup Wizard. You may have noticed that the script contains no line that references the product key. To can add such a line, go to the UserData section and insert the following command:
Product Key = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" (You'll need to replace the X's with a valid product key. I can't include a product key here for obvious reasons.)
Another change you can make is to disable the installation of unwanted Windows components. For example, if your organization frowns on the idea of users playing games on their PCs, you could configure the script so that Solitaire and Minesweeper are not installed on new workstations.
Since there are no existing lines of the script that reference games, you'll have to create them. But the procedure for creating code that blocks the installation of games is different from adding a line that provides Windows with a product key. You placed the code for the product key within an existing section. If you want to block the installation of Windows components, you'll have to create a new section called [Components]. You can place this section at the end of the file. It should look something like this:
Solitaire = Off
Minesweeper = Off
The commands used to disable the Windows components are similar to binary commands, except they use on and off in place of zeros and ones. You can use the [Components] section to disable any Windows components you want.
If you have a specific Windows component you want to disable, I recommend going to a machine that's already running the version of Windows that the script is for and looking up the component's exact name. The easiest way to do this is:
- Open the Control Panel.
- Double-click on the Add/Remove Programs icon.
- When the Add/Remove Programs applet opens, click on the Add/Remove Windows Components button.
- The resulting wizard will display the exact names of all the Windows components. Be sure to enter the component names into the script exactly as they are displayed in the wizard.
Although I addressed screen resolution in my previous article, I will add that I recommend adjusting the various commands in the [Display] section to set the display resolution to at least 1024 x 768 with a 32-bit color depth. The default refresh rate of 60Hz should be fine.
Since Internet Explorer is an integrated part of Windows, you can actually configure it directly through the deployment script. There are so many configuration options for Internet Explorer that I could write an entire book on the subject. There is no way I can possibly do the topic justice within the limitations of an article, but I wanted to at least show you a sample of what you can do.
By default, Internet Explorer uses www.msn.com as its home page. You can adjust the script to set the default home page to your company's home page. You might also want to add a couple of Web sites to Internet Explorer's Favorites list as well.
To set the workstation's home page, all you have to do is to create a section called [URL] and then add a line telling Windows what to set the home page to. The section should look something like this:
Home_Page = http://www.techtarget.com
Adding Web pages to the workstation's Favorites list works in a similar way. You must create a section named [FavoritesEx] and then place the commands within that section. You are going to need two lines of code for each favorite you define. One line provides the Web page title that is displayed in the Favorites menu. Since technically you are creating a shortcut, you must append .url to the end of the title.
The second line of code provides the actual URL used by the shortcut. Below is a sample block of code. Notice that both of the lines of code in the [FavoritesEx] section are numbered. These numbers help Windows tell which URL goes with which page title.
Title1 = "Microsoft's Web Site.url"
URL1 = http://www.microsoft.com
The next article will contain some of the more advanced script customization techniques.
About the author: Brien M. Posey, MCSE, is a Microsoft Most Valuable Professional for his work with Windows 2000 Server, Exchange Server and IIS. He has served as CIO for a nationwide chain of hospitals and was once in charge of IT security for Fort Knox. He writes regularly for SearchWinComputing.com and other TechTarget sites.
More information on this topic:
- Tip: Turning a standard RIS installation into a scripted one
- Topics: Configuration management
- RSS: Sign up for our RSS feed to receive expert advice every day.