<ComputerName>%Please input a computer name(0,15)%</ComputerName>
<JoinDomain>%Please select a domain to join{your.domain.com}%</JoinDomain>
These are specific entries when using mysysprep2. They will show up as errors in SIM but ignore the errors. The (0,15) in the <ComputerName> field will automatically truncate the computer name if longer than 15 characters.
<CopyProfile>true</CopyProfile>
This tells sysprep to copy the configured profile you’ve created to the default profile.
<MachineObjectOU>OU=Test,DC=Your,DC=Domain,DC=Here</MachineObjectOU>
The other thing regarding the unattend.xml, you need to create a local user during the sysprep process. When you install Windows 7 (using the disks) you’re prompted to create a local user. This process still occurs when using an attend.xml file and sysprep. In the answer file I create a local user named TempUser. TempUser gets deleted when the laptop first boots up to Windows logon screen. The sole purpose of TempUser is to hide the prompt to create a local user after sysprep runs.
net user TempUser /delete
To enable the local Administrator account, add the following command to SetupComplete.cmd:
net user Administrator /active:yes
Even though you may have enabled the administrator account on the imaged laptop before running sysprep, it will be disabled again.
del C:\Windows\System32\Sysprep\unattend.xml
Even though the passwords you enter in the xml file are encrypted, you’ll feel better knowing the file is not there.
mysysprep.exe \generalize \oobe \shutdown \unattend:unattend.xml
The computer will shut down after sysprep has finished.
<JoinDomain>%Please select a domain to join{your.domain.com}%</JoinDomain>
If you have multiple domains you can also add it so the string to produce a dropdown menu.
<JoinDomain>%Please select a domain to join{domain1;domain2;domain3}%</JoinDomain>
The computer will then complete the setup process and eventually boot up to the Windows logon screen. If all went well you should be able to log in using your domain account.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsBackup]
"DisableMonitoring"=dword:00000001
- Here’s a script that un-pins the default shortcuts on the taskbar when a user first logs in and adds your own custom shortcuts. The script is from: http://social.technet.microsoft.com/forums/en-us/w7itproinstall/thread/07C56C20-3F56-4191-84C6-FC033F7A8F29
Option Explicit
Const CSIDL_STARTMENU = &HB
Const CSIDL_COMMON_PROGRAMS = &H17
Dim objShell, objFSO
Dim objCurrentUserStartFolder
Dim strCurrentUserStartFolderPath
Dim objAllUsersProgramsFolder
Dim strAllUsersProgramsPath
Dim objFolder
Dim objFolderItem
Dim colVerbs
Dim objVerb
Set objShell = CreateObject("Shell.Application")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objCurrentUserStartFolder = objShell.NameSpace (CSIDL_STARTMENU)
strCurrentUserStartFolderPath = objCurrentUserStartFolder.Self.Path
Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS)
strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path
'''''''''''''''''''''''''''''''''''''''Unpin Shortcuts'''''''''''''''''''''''''''''''''''''''
'*** All Users Shortcuts ****
'Internet Explorer
If objFSO.FileExists(strAllUsersProgramsPath & "\Network & Internet\Microsoft\Internet Explorer.lnk") Then
Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Network & Internet\Microsoft")
Set objFolderItem = objFolder.ParseName("Internet Explorer.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb In colVerbs
If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt
Next
End If
'Mozilla Firefox
If objFSO.FileExists(strAllUsersProgramsPath & "\Network & Internet\Mozilla Firefox\Mozilla Firefox.lnk") Then
Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Network & Internet\Mozilla Firefox")
Set objFolderItem = objFolder.ParseName("Mozilla Firefox.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb In colVerbs
If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt
Next
End If
'Windows Explorer
If objFSO.FileExists(strAllUsersProgramsPath & "\Accessories\Windows Explorer.lnk") Then
Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Accessories")
Set objFolderItem = objFolder.ParseName("Windows Explorer.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb In colVerbs
If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt
Next
End If
'Windows Media Player
If objFSO.FileExists(strAllUsersProgramsPath & "\Network & Internet\Microsoft\Windows Media Player.lnk") Then
Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Network & Internet\Microsoft")
Set objFolderItem = objFolder.ParseName("Windows Media Player.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb In colVerbs
If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt
Next
End If
'*** Current Users Shortcuts ****
'Internet Explorer
If objFSO.FileExists(strCurrentUserStartFolderPath & "\Programs\Internet Explorer.lnk") Then
Set objFolder = objShell.Namespace(strCurrentUserStartFolderPath & "\Programs")
Set objFolderItem = objFolder.ParseName("Internet Explorer.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb In colVerbs
If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt
Next
End If
'Mozilla Firefox
If objFSO.FileExists(strCurrentUserStartFolderPath & "\Programs\Mozilla Firefox\Mozilla Firefox.lnk") Then
Set objFolder = objShell.Namespace(strCurrentUserStartFolderPath & "\Programs\Mozilla Firefox")
Set objFolderItem = objFolder.ParseName("Mozilla Firefox.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb In colVerbs
If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt
Next
End If
'Windows Explorer
If objFSO.FileExists(strCurrentUserStartFolderPath & "\Programs\Accessories\Windows Explorer.lnk") Then
Set objFolder = objShell.Namespace(strCurrentUserStartFolderPath & "\Programs\Accessories")
Set objFolderItem = objFolder.ParseName("Windows Explorer.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb In colVerbs
If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt
Next
End If
'Windows Media Player
If objFSO.FileExists(strCurrentUserStartFolderPath & "\Programs\Windows Media Player.lnk") Then
Set objFolder = objShell.Namespace(strCurrentUserStartFolderPath & "\Programs")
Set objFolderItem = objFolder.ParseName("Windows Media Player.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb In colVerbs
If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt
Next
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''Pin Shortcuts''''''''''''''''''''''''''''''''''''''''
'Internet Explorer - All Users
If objFSO.FileExists(strAllUsersProgramsPath & "\Network & Internet\Microsoft\Internet Explorer.lnk") Then
Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Network & Internet\Microsoft")
Set objFolderItem = objFolder.ParseName("Internet Explorer.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb In colVerbs
If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
Next
End If
'Mozilla Firefox - All Users
If objFSO.FileExists(strAllUsersProgramsPath & "\Network & Internet\Mozilla Firefox\Mozilla Firefox.lnk") Then
Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Network & Internet\Mozilla Firefox")
Set objFolderItem = objFolder.ParseName("Mozilla Firefox.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb In colVerbs
If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
Next
End If
'Windows Explorer - Current User
If objFSO.FileExists(strCurrentUserStartFolderPath & "\Programs\Accessories\Windows Explorer.lnk") Then
Set objFolder = objShell.Namespace(strCurrentUserStartFolderPath & "\Programs\Accessories")
Set objFolderItem = objFolder.ParseName("Windows Explorer.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb In colVerbs
If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
Next
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- You set your "Network Location" in your unattend.xml file but still get prompted for it when first logging in.
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<servicing></servicing>
<settings pass="oobeSystem">
<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">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>
</OOBE>
<ShowWindowsLive>false</ShowWindowsLive>
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
<BluetoothTaskbarIconEnabled>false</BluetoothTaskbarIconEnabled>
<TimeZone>Eastern Standard Time</TimeZone>
<UserAccounts>
<AdministratorPassword>
<Value>AdminPassword</Value>
<PlainText>false</PlainText>
</AdministratorPassword>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value>TempUserPassword</Value>
<PlainText>false</PlainText>
</Password>
<Description>Temp Local Account</Description>
<DisplayName>TempUser</DisplayName>
<Group>Users</Group>
<Name>TempUser</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<DoNotCleanTaskBar>true</DoNotCleanTaskBar>
</component>
<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>EN-US</InputLocale>
<SystemLocale>EN-US</SystemLocale>
<UILanguage>EN-US</UILanguage>
<UserLocale>EN-US</UserLocale>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Security-SPP-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-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">
<CopyProfile>true</CopyProfile>
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
<TimeZone>Eastern Standard Time</TimeZone>
<ShowWindowsLive>false</ShowWindowsLive>
<RegisteredOrganization>Organization Name</RegisteredOrganization>
<RegisteredOwner>Registered Owner</RegisteredOwner>
<ProductKey>Your Product Key Here</ProductKey>
<DoNotCleanTaskBar>true</DoNotCleanTaskBar>
<BluetoothTaskbarIconEnabled>false</BluetoothTaskbarIconEnabled>
<Display>
<HorizontalResolution>1024</HorizontalResolution>
<VerticalResolution>768</VerticalResolution>
<RefreshRate>60</RefreshRate>
<ColorDepth>32</ColorDepth>
</Display>
<ComputerName>%Please input a computer name(0,15)%</ComputerName>
</component>
<component name="Microsoft-Windows-UnattendedJoin" 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">
<Identification>
<Credentials>
<Domain>your.domain.com</Domain>
<Password>Password</Password>
<Username>Username of account to add PC to domain</Username>
</Credentials>
<JoinDomain>%Please select a domain to join{your.domain.com}%</JoinDomain>
<MachineObjectOU>OU=Test,DC=Your,DC=Domain,DC=Here</MachineObjectOU>
</Identification>
</component>
</settings>
<settings pass="generalize">
<component name="Microsoft-Windows-Security-SPP" 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">
<SkipRearm>1</SkipRearm>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:c:/temp/install.wim#Windows 7 ULTIMATE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
DisableBackupMonitoring.reg
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (104)
Commented:
But this is in x86 Windows 7 in VMWare so I will try again tomorrow in Win764 bit.
Commented:
I guess I will stick to RunOnce chaining for naming computer and joining domain.
There's no support for MySysprep2 either I sent 2 emails to the guy a few days ago and haven't heard back yet.
Commented:
I used this procedure to image and deploy Win7 professional 64bit. Everything works fine but after I enter the computer name and Domain in Mysysprep2 dialog boxes, I again get prompt by Windows to give name to computer, which then overwrites the name which I had given during sysprep. And so the machine is also not joined to the Domain.
Does anyone else got this problem?
Where I am doing wrong?
Thanks
Author
Commented:The naming box that appears twice, is this the same box or do they look different?
Not sure why you're getting prompted twice to name your computer. The first place to check is your unattend.xml file. Make sure of the data in the following fields in your unattend file:
<ComputerName>%Please input a computer name(0,15)%</ComputerName>
See attached image.
There shouldn't be any other fields that contain computer name in your xml. Try recreating your unattend.xml file if this still is a problem.
IV
Capture.jpg
Commented:
I am having issues with mysysprep so if anyone could please look at my question located here and provide assistance, I would be eternally grateful:
https://www.experts-exchange.com/questions/28432747/Windows-7-Pro-64bit-issue-when-sysprepping-using-mysysprep-and-unattend-xml.html
I already have a full head of grey hair thanks to this, so the next stage will be to pull it out.
View More