by Charles Windom, Senior Product Marketing Manager End-User Computing
While working on the upcoming release of our Windows 7/8 Optimization Guide, I had some thoughts and I just wanted to share some of the things I noticed while modifying our batch file script and updating the procedures for use with Microsoft Deployment Kit (MDT) 2012 Update1 and testing these processes to ensure they work as expected.
Locating and Installing VMware tools
In previous vSphere versions we instructed you to navigate to the “C:\ProgramFiles\VMware” directory to locate VMware Tools in order to get the drivers for use with MDT 2010. This worked for version 4.x. As of vSphere version 5.0 and greater you need to navigate the driver store repository located at “C:\Windows\System32\DriverStore\Repository” and copy the following directories to the MDT 2012 Update 1 server:
- vmxnet3ndis6.inf… copy and rename to network
Create a folder called VMware Drivers and copy the drivers into this folder. These drivers can then be added to the MDT server deployment share and injected into the image upon deployment. Although other drivers exist, the only driver required to execute the WinPE boot is the VMXNET3 driver.
For Windows 8 there is a new look and feel to the operating system and this can be drag on performance and cumbersome to use without a touch screen computer. While some users like this look, others prefer the “Windows Classic Desktop”. Microsoft had hinted before release that there would be an option for corporate users to use the “Windows Classic Desktop” but reversed its decision I guess as you cannot disable Metro UI via Microsoft utilities or commands.
To change the OS behavior to the Windows 7” Classic Desktop”, you would have to install one of available utilities out there such as:
- EX7forW8 (Explorer 7 for Windows 8) – Utility requires Windows 7 boot disc
- RetroUI – Application installed on top of Windows 8
Both these utilities will enable the Windows 7 look and feel; however it must be explicitly stated that there is no support from Microsoft for these utilities.
In Windows 7 Professional, Home Premium and Ultimate editions, Windows Media Center was included in the OS and installed by default. So, in our optimization script we execute commands to disable and stop the Media Center services. For Windows 8 Media Center has become an add-on and is no longer installed by default. For the Windows 8 script we removed those optimizations. Other services we disable in the OS are the Hyper-V Hypervisor services. Also new in Windows 8 a lot of services are now configured to started by triggers when you touch some portion of the operating system that require that service.
The order of commands matters….sometimes
Two specific instances of this come to mind. If you want to delete volume shadow copy files using “vssadmin delete shadows /All /Quiet”, you will need to ensure the volume shadow copy service is running before issuing this command. If you disable the service before you issue the vssadmin command, you will generate an error stating that the vss service is not running.
Another process I’ve found is around deleting the Windows Update directory, if you want to delete all of the Windows Update uninstall files using the remove directory command, “rd /S /Q %WINDIR%\SoftwareDistribution”, you must ensure that you have already disabled the Windows Update service otherwise the remove directory command will fail because the directory will be open and in use by the Windows Update service.
Kill it and kill it again
There multiple ways to stop and disable services. For example, to disable the system restore, our script has a registry change:
“reg ADD “HKLM\SOFTWARE\Policies\Microsoft\Windows NT\SystemRestore” /v DisableSR /t REG_DWORD /d 0x1 /f”.
We also use the PowerShell command:
“PowerShell disable-ComputerRestore -drive c:\” command.
To disable SuperFetch we use the following three commands:
“reg ADD “HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters” /v EnableSuperfetch /t REG_DWORD /d 0x0 /f”;
“PowerShell Set-Service ‘SysMain’ -startuptype “disabled””;
and the “net stop “sysmain” . You may get an error message if you try to kill something that is already stopped, but no harm no foul. Some services may already be started and will need to be stopped as well as disabled.
HKU\.Default is NOT the default user hive
In the Windows Optimization script we deploy a method to update new user registry settings by modifying the default user hive. (We load that hive into a temporary registry folder, modify it, and then save and unload it). This default hive is located at “%USERPROFILE%\..\Default User\NTUSER.DAT” which typically translates to “c:\users\default user\ntuser.dat”. On the other hand, the HKU\.Default hive controls properties of the login process which is responsible for displaying the Windows login screen. We, in fact, modify this hive, too, to disable the screen saver at the login screen.
Applying new user settings from the default user hive won’t always work
If you want to use the default user hive at c:\users\default user\ntuser.dat to modify user registry settings for new users, you need to make sure there is no domain wide default user hive. The domain wide default user hive can be found by browsing to \\domain.com\Netlogon\Default User.v2\ntuser.dat where “domain.com” is the name of your internal View Active Directory domain. If the domain wide default user hive exists, it will always be used instead of the local default user hive. Possible workarounds to this issue are to remove the domain wide default hive, or modify the script to upload modify and unload the domain-wide hive, or use domain group policy to apply per user customizations. To avoid this scenario, we should always try to customize the “golden image”
To Recycle or Not to Recycle
In the previous versions of the guide, our script specifically disables the recycling bin. This means whenever the user deletes a file or directory, that deletion is permanent and cannot be undone.
This customization was recommended to save disk space. Through feedback we have found users actually like the undelete functionality of the recycle bin. In this version of the guide we re-enabled the recycling bin. Since the recycling bin is enabled by default, this can be considered redundant, but the key is added as a convenient place holder in the script incase you want to modify the script to turn off the recycling bin functionality.
Don’t forget to optimized your applications
The focus of the optimization guide is to optimize the OS image but if applications are to be installed in the base image, you should apply additional optimizations for those applications as well. For example, our new script includes two application level registry key adds: one for turning off the View Agent trace and the other for turning off the View Agent debug. An important point: since the script now changes registry keys associated with an application (View Agent) you want to ensure the script is applied after that application is installed or there is the possibility of those registry changes being overwritten. This would apply to any other application optimizations you may want to add to the script as well. Our previous version of the guide instructed running the script after installing and upgrading the OS. We now recommend running the script only after all other applications have been installed on the base image.
NOTE: For those of you running AutoDesk applications and any other applications that might require access to a license server be sure to re-enable the Iphelper service to avoid application licensing issues.
Give us your opinion
Please download our upcoming Windows 8 and Windows 7 Optimization Guides, try the scripts and let us know what you think.