Chapter 16: Special Scripting for Windows XP and 2003


In Brief

It seems a new operating system comes out almost every year. While the constant upgrading, bugs , and change makes support more difficult, the new and improved features can help ease some of your pain. This final chapter will show you scripting techniques and examples designed specifically for the new features of Windows XP and 2003. And who said having the "latest and greatest" doesn't have its benefits?

Product Activation

Software piracy continues to be a huge problem for software vendors . Product activation is a technology designed to reduce the piracy of Microsoft applications and operating systems. Through product activation, Microsoft is ensured that their end users have legally obtained the software, and their end users are ensured that they have obtained an official, supported product from Microsoft. Microsoft has included this protection mechanism in their products since Windows XP.

How Product Activation Works

Before using a protected product, the product first needs to be "activated." Without activation, a product will stop working after a certain time frame or usage amount (grace period) and may prevent you from using the entire product or advanced features. The activation process generates a "hardware code" which is unique to the hardware installed in your computer. This code is transmitted to Microsoft over the Internet. (It can also be transmitted by phone.) Once transmitted, it is verified by Microsoft servers and a confirmation ID is returned when successful. Once the ID is returned, the product has been activated.

The Activation Blues

While activation may help Microsoft reduce piracy for its products, it also causes aggravation for its users. With every rebuild of your system, you will have to reactivate your protected product. Since the "hardware code" is based on the hardware configuration in your computer, you may also be forced to reactivate after adding or removing a few hardware components . Finally, users without Internet access will be forced to call Microsoft every time they need to activate.

System Restore

Windows XP and 2003 include a feature called System Restore designed to quickly resolve problems to the operating system. Originally introduced in Windows ME, System Restore provides a method to revert a system back to a previously known working state in the event a serious issue occurs.

Restore Points

A restore point is a compressed snapshot of your system's key files and registry entries. System restore creates restore points daily, on demand, and when certain events occur. These events include application installs that use the windows installer, updates applied by Windows Update (http://windowsupdate.microsoft.com), and when System Restore rolls back to a restore point.

MMC 2.0

Windows XP and 2003 contain the latest version of the Microsoft Management Console (MMC), version 2.0. MMC 2.0 includes many new features such as automatic saving of settings, smaller console file sizes, view extensions, enhanced drag and drop support, and the much needed Automation Object Model.

Automation Object Model

The MMC 2.0 Automation object allows you interface with the MMC through scripting. This is the first time Microsoft has exposed the MMC to scripting. The object model allows you to modify console files, snapins, documents, views, and more.

As you learned in Chapter 1, in order to gain access to an object, you must first use the CreateObject method and set it to a variable:

 Set  variable  = CreateObject("MMC20.Application") 

While the application object is not the only object in the MMC 2.0 Automation object model, for administrators it is the most important as it allows us to initiate, control, and terminate MMC sessions. For more information about the MMC 2.0 Automation object model, please visit the following site:

http://msdn.microsoft.com/library/default.asp?url=/library/enus/mmc/mmc/document_object.asp




Windows Admin Scripting Little Black Book
Windows Admin Scripting Little Black Book (Little Black Books (Paraglyph Press))
ISBN: 1933097108
EAN: 2147483647
Year: 2004
Pages: 89

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net