Hello
I'm trying to build a one touch windows install with unattend file.
There is still 1 script during specialize (RunSynchronous) that is not working as expected:
The script is supposed to add AD description after computer creation in AD.
The join domain is working, script is running after, using same domain credentials, and description is not changed.
Running the same script after windows startup is working. (run as same domain credentials)
- template of the vbs script: (copy in c:\windows\customAD.vbs)
strContainer = "OU=Computers"
strName = "#COMPUTERNAME#"
Set objItem = GetObject("LDAP://cn=" & strName & "," & strContainer & ",DC=local,DC=com")
objItem.Put "description", "TEST"
objItem.SetInfo
- part of unattend file:
<component name="Microsoft-Windows-International-Core" 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">
<InputLocale>#LOCALE#</InputLocale>
<SystemLocale>#LOCALE#</SystemLocale>
<UILanguage>#LOCALE#</UILanguage>
<UserLocale>#LOCALE#</UserLocale>
</component>
<component name="Microsoft-Windows-Shell-Setup" 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">
<ComputerName>#COMPUTERNAME#</ComputerName>
<CopyProfile>true</CopyProfile>
<RegisteredOrganization>ORG</RegisteredOrganization>
<RegisteredOwner>ORG</RegisteredOwner>
<ProductKey>xxxxxxxxxxxxxxxxxxxxxxxxxxxxx</ProductKey>
<ShowWindowsLive>false</ShowWindowsLive>
<TimeZone>#TIMEZONE#</TimeZone>
</component>
<component name="Microsoft-Windows-UnattendedJoin" 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">
<Identification>
<JoinDomain>local.com</JoinDomain>
<MachineObjectOU>OU=Computers,DC=local,DC=com</MachineObjectOU>
<JoinWorkgroup></JoinWorkgroup>
<Credentials>
<Domain>local</Domain>
<Password>#JOINPWD#</Password>
<Username>#JOINUSERNAME#</Username>
</Credentials>
</Identification>
</component>
<component name="Microsoft-Windows-Deployment" 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">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Credentials>
<Domain>local</Domain>
<Password>#JOINPWD#</Password>
<Username>#JOINUSERNAME#</Username>
</Credentials>
<Order>1</Order>
<Description>AD Custom attribute</Description>
<Path>cscript c:\windows\CustomAD.vbs</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>