IThastobecool.com Geeks have opinions too!

17Jul/093

How to remove Windows Cardspace from the control panel of Windows XP

Today I was messing around with some policy settings at a customer site and they asked if I could disable the Windows Cardspace component in the Control Panel, of course I googled around first, but couldn’t find any usefull info, so I started looking in the registry myself, here’s how you do it.

 

  • Start Regedit.exe and navigate to:

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ policies \ NonEnum

  • Create a new DWORD value named {78CB147A-98EA-4AA6-B0DF-C8681F69341C}
  • Double-click {78CB147A-98EA-4AA6-B0DF-C8681F69341C} and set its data to 1
  • Close Regedit.exe

When you need to disable it centrally (like me) just use the Group Policy Preferences from Windows 2008 / Vista (which can be used on a Windows 2003 domain as long as the policy has been made on a 2008 or Vista machine)

2Jul/090

Sysprepping 2008 and Vista installations: How-To

Well, howto sysprep 2003 and XP installations is a walk in the park, everyone knows that… but sysprepping a Windows 2008,Vista or 7/2008R2 installation is a bit more difficult.

Here’s what you do:
Use this sample sysprep.xml file, modify the values to your needs, add some stuff, remove some stuff. I’ll explain in brief what the sysprep.xml does ;)

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="specialize">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <ComputerName>*</ComputerName>
      <RegisteredOrganization>Henk</RegisteredOrganization>
      <RegisteredOwner>Henk</RegisteredOwner>
      <ShowWindowsLive>false</ShowWindowsLive>
      <ProductKey>AAAAA-BBBBB-CCCCC-DDDDD-EEEEE</ProductKey>
    </component>
    <component name="Microsoft-Windows-Security-Licensing-SLC-UX" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SkipAutoActivation>true</SkipAutoActivation>
    </component>
    <component name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <IEHardenAdmin>false</IEHardenAdmin>
      <IEHardenUser>false</IEHardenUser>
    </component>
  </settings>
  <settings pass="oobeSystem">
    <component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <InputLocale>0409:00000409</InputLocale>
      <SystemLocale>en-us</SystemLocale>
      <UILanguage>en-us</UILanguage>
      <UserLocale>en-us</UserLocale>
    </component>
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <RegisteredOrganization>Henk</RegisteredOrganization>
      <RegisteredOwner>Henk</RegisteredOwner>
      <UserAccounts>
        <AdministratorPassword>
          <Value>p@ssw0rd</Value>
          <PlainText>true</PlainText>
        </AdministratorPassword>
      </UserAccounts>
      <OOBE>
        <HideEULAPage>true</HideEULAPage>
        <NetworkLocation>Work</NetworkLocation>
        <ProtectYourPC>3</ProtectYourPC>
      </OOBE>
      <Display>
        <ColorDepth>32</ColorDepth>
        <HorizontalResolution>1024</HorizontalResolution>
        <VerticalResolution>768</VerticalResolution>
      </Display>
      <TimeZone>W. Europe Standard Time</TimeZone>
    </component>
  </settings>
  <settings pass="generalize">
    <component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon>
    </component>
    <component name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon>
    </component>
  </settings>
</unattend>

In short what this sysprep.xml does (from bottom to top):

  • Disables the Initial Configuration Tasks screen at logon
  • Disables the Server Manager screen at logon
  • Sets timezone to W. Europe Standard Time
  • Sets resolution to 1024x768x32
  • Sets Automatic Updates to not configured
  • Sets the Network connection to Work
  • Hides the EULA prompt
  • Sets the administrator password to: p@ssw0rd
  • Sets the Organization and Registered user to Henk
  • Sets User, UI, System and InputLocale to en-US
  • Disables the IE Enhanced Security Configuration
  • Skips auto-activation of Windows
  • Sets the product key to AAAAA-BBBBB-CCCCC-DDDDD-EEEEE
  • Disables Windows Live features
  • Generates a Random hostname

Ok, so now you have a sysprep.xml… what do you do with it?
In your Server 2008 (in this example) copy the sysprep.xml to c:\windows\system32\sysprep\sysprep.xml

Now execute: sysprep /generalize /oobe /shutdown /unattend:sysprep.xml
After this your system shuts down, and you can either image it, but in most cases it’s probably a VHD or VMDK file and you just copy it ;) . When you messed up your sysprep.xml and allready ran the sysprep command on your system you will have in most cases no choice but to reinstall the system, and resysprep it. For VHD scenario’s there a little trick, however :) . Read my previous blogpost about editing the unattend.xml file directly inside of the VHD.

Tagged as: No Comments
2Jul/090

Windows 7 (and Server 2008 R2) Mount VHD function a real saver when you messed up your sysprep unattend.xml file

Don’t you just hate it when you are preparing some sysprepped Windows Server 2008 VHD’s you use as a template for all your Virtual Lab environments with Virtual PC, sysprepped the Server 2008 installation and during deployment you find out you messed up a setting in the sysprep XML file? Well I do anyway, so here goes ;) .

Windows 7 (and Windows Server 2008 R2 as well) has a really nice feature called Atach VHD available in the Disk Management MMC (diskmgmt.msc for you geeks ;) )

diskmgmt

So you just attach your sysprepped VHD file and replace the Windows\Panther\unattend.xml file with a corect file (for some reason editing the xml file directly gives some access denied errors, mess around with Take Ownership and setting some security permissions, you all know how it’s done :P ). Detach the VHD file and there you go… nice and smooth mini-setup of Windows 2008 or Vista :)

Filed under: Uncategorized No Comments