Scripting

Sys Prep Setup

How to nuke the HAL database to move a drive using SysPrep.

  1. Create a folder c:\sysprep
  2. Extract the sysprep cab file to it.
  3. Run SetupMgr.exe and follow the instructions to create your sysprep.ini file.
  4. Rename this file sysprep.bak
  5. Create a blank sysprep.inf file in the same directory as sysprep.exe.
  6. Open the sysprep.inf file and add the following text to the first line of the file: [SysprepMassStorage]
  7. Save and close sysprep.inf
  8. Run sysprep -bmsd. This will dump all of the plug and play IDs from the driver.cab file into the sysprep.inf file.
  9. Copy the contents of the sysprep.bak file above the [SysprepMassStorage] section in sysprep.ini.
  10. Run sysprep -clean then
  11. Run sysprep -reseal -mini -pnp -noreboot
  12. Move the drive to the new machine
  13. Boot up and finish the setup wizard!