Hello,
I run cmd script called from the unattend.xml of Windows sysprep.
This script makes a 60s break to wait network to start then run SDI (Snappy Driver Installer) that works perfectly when run manually.
During the script process, i have a reboot requested by wmiprvse.exe (WMI Provider Host).
This happen during the 60s, or during driver installation when i remove the 60s delay.
I have run SAD (Stand Alone Driverpack) for a year using the same way without any reboot during the process.
The only change made are that i was running SAD directly in the unattend.xml but now i call a cmd to run SDI.
Does anyone have idea why I have this reboot, if i can avoid it or if i have made a stupid mistake somewhere ?
Thank you.
Here is all the details i can provide.
Content of unattend.xml
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<CommandLine>C:\SDI.cmd</CommandLine>
<Order>1</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c del C:\SDI.cmd</CommandLine>
<Order>2</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c rmdir C:\Users\Administrateur\Desktop\sysprep /s /q</CommandLine>
<Order>3</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
</FirstLogonCommands>
The cmd script
@echo off
echo %date% %time% Fichier de log cree >> C:\imageresults.txt 2>&1
echo %date% %time% Demarrage du script >> C:\imageresults.txt 2>&1
echo %date% %time% Attente de 60 secondes pour activation du LAN >> C:\imageresults.txt 2>&1
timeout /t 60 /nobreak >> C:\imageresults.txt 2>&1
echo %date% %time% Montage du partage samba de fog >> C:\imageresults.txt 2>&1
NET USE z: \\fogserver\Drivers
Z:
if not %cd% == Z:\ goto nofog
echo %date% %time% Installation drivers via SDI >> C:\imageresults.txt 2>&1
FOR /F "tokens=*" %%G IN ('DIR /B *.exe') do start /wait %%G -autoinstall -nologfile -autoclose -license
C:
NET USE /delete /yes Z:
:nofog
::echo %date% %time% Activation Windows >> C:\imageresults.txt 2>&1
::cscript C:\Windows\system32\slmgr.vbs /ato >> C:\imageresults.txt 2>&1
shutdown -r -t 30
exit