SOLVED Reboot made by wmiprvse.exe during first boot after sysprep

  • I have just make a test with only a “pause” in the script and there is no unwanted reboot.

  • Thank you for your reply.

    I’m sure drivers install is not related to the reboot problem because, as i said, the timeout command is stopped before the 60 second.

    I’ll repeat in case i wasn’t clear :

    • Case 1 with the timeout command : countdown is stopped before reaching 0.
    • Case 2 without the timeout command : SDI is forced to closed during install.

    I have tested most of the posibilities possible during few days (this script was in setupcomplete.cmd at first) such as removing the timeout command, reducing it, adding or removing some “start /wait” or “cmd /c” in the xml.
    I ended adding the %time% and the %date% to check system event and i see clearly a message saying that “wmiprvse.exe has initiated the restart of computer” but there is no more details.

    I start to think that the computer doesn’t see that there is a script running so here my last test left, just set a “pause”.

  • your CMD script.

    I added output to the part that installs the drivers. Perhaps it might give clues?

    [CODE]@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
    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:\DriverInstallOutput.txt
    NET USE /delete /yes Z:
    ::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