legacy-wiki
Sysprep
Recovered from the older tannerjc.net wiki snapshot dated January 23, 2016.
Prepares the Windows installation to be imaged. If this option is specified, all unique system information is removed from the Windows installation. The security ID (SID) resets, any system restore points are cleared, and event logs are deleted.
The next time the computer starts, the specialize configuration pass runs. A new security ID (SID) is created, and the clock for Windows activation resets, if the clock has not already been reset three times.
- /oobe
Restarts the computer into Windows Welcome mode. Windows Welcome enables end users to customize their Windows operating system, create user accounts, name the computer, and other tasks. Any settings in the oobeSystem configuration pass in an answer file are processed immediately before Windows Welcome starts.
- /shutdown
Shuts down the computer after Sysprep completes.
SetupComplete.cmd
-
http://technet.microsoft.com/en-us/library/cc766314%28v=ws.10%29.aspx
-
This script will get executed on firstboot ff the machine is sysprepped with /generalize /oobe /shutdown, and the script is in the the right directory. bVERIFIED/b
c:\type c:\windows\setup\scripts\SetupComplete.cmd
mkdir c:\firstboot
c:\
-
There is no mention of setupcomplete.cmd in c:\windows\setupact.log or c:\windows\panther\setupact.log
-
There should be a mention of setupcomplete.cmd in c:\windows\panther\unattendgc\setupact.log
-
environment variables
c:\type c:\windows\setup\scripts\SetupComplete.cmd
mkdir c:\firstboot
c:\
c:\echo %WINDIR%
C:\Windows
c:\echo %HOMEDRIVE%
C:
- generated unattended.xml (this was not passed to sysprep)
?xml version='1.0' encoding='utf-8'?
unattend xmlns=urn:schemas-microsoft-com:unattend xmlns:wcm=http://schemas.microsoft.com/WMIConfig/2002/State
settings pass=windowsPE wasPassProcessed=true
component name=Microsoft-Windows-Setup publicKeyToken=31bf3856ad364e35 language=neutral versionScope=nonSxS processorArchitecture=amd64
UserData
AcceptEulatrue/AcceptEula
!-- The following section only needed for Vista installs --
/UserData
DiskConfiguration
WillShowUIOnError/WillShowUI
Disk
DiskID0/DiskID
WillWipeDisktrue/WillWipeDisk
CreatePartitions
CreatePartition
Order1/Order
TypePrimary/Type
Extendtrue/Extend
/CreatePartition
/CreatePartitions
/Disk
/DiskConfiguration
ComplianceCheck
DisplayReportOnError/DisplayReport
/ComplianceCheck
ImageInstall
OSImage
InstallFrom
MetaData wcm:action=add
Key/IMAGE/NAME/Key
ValueWindows Server 2008 R2 SERVERENTERPRISE/Value
/MetaData
/InstallFrom
InstallTo
DiskID0/DiskID
PartitionID1/PartitionID
/InstallTo
WillShowUIOnError/WillShowUI
InstallToAvailablePartitionfalse/InstallToAvailablePartition
/OSImage
/ImageInstall
/component
component name=Microsoft-Windows-International-Core-WinPE publicKeyToken=31bf3856ad364e35 language=neutral versionScope=nonSxS processorArchitecture=amd64
InputLocaleen-US/InputLocale
SystemLocaleen-US/SystemLocale
UILanguageen-US/UILanguage
UserLocaleen-US/UserLocale
/component
/settings
settings pass=oobeSystem wasPassProcessed=true
component name=Microsoft-Windows-Shell-Setup publicKeyToken=31bf3856ad364e35 language=neutral versionScope=nonSxS processorArchitecture=amd64
AutoLogon
Password*SENSITIVE*DATA*DELETED*/Password
Enabledtrue/Enabled
Usernamejtanner/Username
/AutoLogon
UserAccounts
LocalAccounts
LocalAccount wcm:action=add
Password*SENSITIVE*DATA*DELETED*/Password
Groupadministrators;users/Group
Namejtanner/Name
/LocalAccount
/LocalAccounts
/UserAccounts
OOBE
HideEULAPagetrue/HideEULAPage
ProtectYourPC3/ProtectYourPC
SkipMachineOOBEtrue/SkipMachineOOBE
SkipUserOOBEtrue/SkipUserOOBE
NetworkLocationOther/NetworkLocation
/OOBE
FirstLogonCommands
SynchronousCommand wcm:action=add
CommandLinecmd /c copy a:\upgrader.exe %TEMP%\upgrader.exe/CommandLine
Order1/Order
/SynchronousCommand
SynchronousCommand wcm:action=add
CommandLinecmd /c copy a:\unattend.cmd %TEMP%\unattend.cmd/CommandLine
Order2/Order
/SynchronousCommand
SynchronousCommand wcm:action=add
CommandLinecmd /c copy a:\storePwd.exe %TEMP%\storePwd.exe/CommandLine
Order3/Order
/SynchronousCommand
SynchronousCommand wcm:action=add
CommandLinecmd /c copy a:\storePwd.ini %TEMP%\storePwd.ini/CommandLine
Order4/Order
/SynchronousCommand
SynchronousCommand wcm:action=add
CommandLine%TEMP%\unattend.cmd/CommandLine
Order5/Order
/SynchronousCommand
SynchronousCommand wcm:action=add
CommandLinepowercfg -setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c/CommandLine
Order6/Order
/SynchronousCommand
SynchronousCommand wcm:action=add
CommandLinenet accounts /MAXPWAGE:UNLIMITED/CommandLine
Order7/Order
/SynchronousCommand
/FirstLogonCommands
TimeZoneEastern Standard Time/TimeZone
/component
/settings
settings pass=specialize wasPassProcessed=true
component name=Microsoft-Windows-Security-Licensing-SLC-UX publicKeyToken=31bf3856ad364e35 language=neutral versionScope=nonSxS processorArchitecture=amd64
SkipAutoActivationtrue/SkipAutoActivation
/component
component name=Microsoft-Windows-Deployment publicKeyToken=31bf3856ad364e35 language=neutral versionScope=nonSxS processorArchitecture=amd64
RunSynchronous
RunSynchronousCommand wcm:action=add
Order1/Order
Pathreg add HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork /v Category /t REG_DWORD /d 00000000 /f/Path
/RunSynchronousCommand
/RunSynchronous
/component
/settings
/unattend