Upgrading Windows Operating System

From BPWiki
Jump to: navigation, search

When upgrading Windows Operating System the following notes may help

Prerequesites

  • New Windows Operating System Install Media
  • New Windows Operating System Install Key
  • Any licensed software Install Media and Key (e.g. Office 2010)

Before Starting

  • Ensure Windows Updates are current
  • Install Windows Easy Transfer if required (e.g. Windows XP)

Saving Install State

  1. Export the registry for the system and each user to the Desktop (you never know!)
  2. If the user has a special folder on another drive (e.g. My Documents), make a note of it and move back to the default drive but do not move the files, leave in place
  3. Run the PowerShell script below to extract installed program names and versions
$computername=$env.computername
#Define the variable to hold the location of Currently Installed Programs
$array = @()
#Create an instance of the Registry Object and open the HKLM base key
$reg=[microsoft.win32.registrykey]::OpenRemoteBaseKey('LocalMachine',$computername)

# Do 64 bit then 32 bit
$UninstallKey="SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
#Drill down into the Uninstall key using the OpenSubKey Method
$regkey=$reg.OpenSubKey($UninstallKey)
#Retrieve an array of string that contain all the subkey names
$subkeys=$regkey.GetSubKeyNames()
#Open each Subkey and use GetValue Method to return the required values for each
foreach($key in $subkeys){
 $thisKey=$UninstallKey+"\\"+$key
 $thisSubKey=$reg.OpenSubKey($thisKey)
 $obj = New-Object PSObject
 $obj | Add-Member -MemberType NoteProperty -Name "DisplayName" -Value $($thisSubKey.GetValue("DisplayName"))
 $obj | Add-Member -MemberType NoteProperty -Name "DisplayVersion" -Value $($thisSubKey.GetValue("DisplayVersion"))
 $obj | Add-Member -MemberType NoteProperty -Name "Publisher" -Value $($thisSubKey.GetValue("Publisher"))
 $array += $obj
 }

# Do 32 bit then 64 bit keys
$UninstallKey="SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
#Drill down into the Uninstall key using the OpenSubKey Method
$regkey=$reg.OpenSubKey($UninstallKey)
#Retrieve an array of string that contain all the subkey names
$subkeys=$regkey.GetSubKeyNames()
#Open each Subkey and use GetValue Method to return the required values for each
foreach($key in $subkeys){
 $thisKey=$UninstallKey+"\\"+$key
 $thisSubKey=$reg.OpenSubKey($thisKey)
 $obj = New-Object PSObject
 $obj | Add-Member -MemberType NoteProperty -Name "DisplayName" -Value $($thisSubKey.GetValue("DisplayName"))
 $obj | Add-Member -MemberType NoteProperty -Name "DisplayVersion" -Value $($thisSubKey.GetValue("DisplayVersion"))
 $obj | Add-Member -MemberType NoteProperty -Name "Publisher" -Value $($thisSubKey.GetValue("Publisher"))
 $array += $obj
 }

$array.GetEnumerator() | Sort-Object DisplayName | select DisplayName, DisplayVersion, Publisher | ft -auto
  1. Perform any special steps for Chrome, Firefox, Thunderbird etc
  2. Backup each user using Windows Easy Transfer

Special Steps for Firefox and Thunderbird

  1. On Old System
    1. Upgrade Firefox and/or Thunderbird to Current Version
    2. Intall MozBackup
    3. Backup each users data using MozBackup
  2. On New System
    1. Install Firefox and/or Thunderbird to same current version
    2. Install same version of MozBackup
    3. Restore each users data using MozBackup

New Installation

  1. Install new operating system
  2. Do not create new users, restore using Easy Transfer
  3. Move users special folders to old locations if using the non-system drive
  4. Reinstall licensed software