Hello,
I am trying to run a script during the post customization of my VM in order to automate the creation of a domain controller.
The script that I wrote in the guest customization of the VM on vCloud Director is the following:
if "%1" == "postcustomization" (
cmd /k "c:\windows\system32\dcpromo.exe" /unattend:C:\Users\Administrator\Desktop\unattend.txt
)
In the unattend text file there is all the needed information to create a new domain controller.
This command works perfectly if called from the command prompt in the VM. But from the customization in vCloud Director it does not.
In the logs of the guest customization, the customization is getting stopped each time at the following step:
Executing command=cmd /c C:\Windows\TEMP\vmw4845.tmp\customscript.bat post customization
I tried to execute the above command from the command prompt, it turned out to work successfully. Therefore the problem is due to VMware tools being unable to continue the customization.
Any idea why is it happening? or am I missing something?
Thank you