Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Wait between Steps

Hello Community,

i am successfully deploying an inPlace Upgrade for Windows 10, and the setup routine exits with an "successfull" excit code, which makes the PDQ Deploy think that everything is finished. After that "successfull" exit, the machine is going to a "windows update blabla" screen and reboots several time, before it comes back online on its own.

I do have some following steps, like cleanup windows.old Folder which i would like to invoke as soon as the machine comes back online. Unfortunately i do not know how to accomplish this, because a sleep command fails with "Failed to connect to the service manager.."

The timeout settings only apply for a step that has started, but in my case no next step can start because the machine is in an "offline" state (updating windows). Is there another workaround to let pdq deploy "wait" for 20 minutes, after the premilinary has succeeded? And than try to start the next step?

Sry for my bad england

Greets from Germany

Ruben

0

Comments

4 comments
Date Votes
  • a sleep command fails with "Failed to connect to the service manager.."

    The PDQ Sleep step fails with that error? I thought the Sleep step was literally a "wait x seconds until moving to next step". I've never seen Sleep error and didn't know it was even possible.

    0
  • Deploy still connects to the target machine before running the step. The issue is that Deploy didn't issue the reboot, so it gets confused. There is an internal feature request for a way to account for this, but I have no ETA on when/if it will happen.

    0
  • thanks for the info colby

    0
  • I know this is an old thread, but I stumbled on it and wanted to share a suggested approach. I did the same thing, and use the setupcomplete.cmd to do it. When you run your setup command, simply add the /postoobe step and point it to your setupcomplete.cmd file that has all your commands, steps in it. If you are doing it with PowerShell, add a line as such: powershell.exe -executionpolicy bypass -file <pathtoyourpowershellscript.ps1>. To keep things simple, I created a folder that had all my scripts, etc. I have even used the setupcomplete.cmd to install drivers. Below is a sample of one of my setupcomplete.cmd scripts

    ::Delete the scheduled task
    schtasks /delete /tn "Windows 10 Upgrade" /f

    ::Disable Windows Hi animation & UAC Settings
    regedit /s "C:\Temp\Win10_1909\Post\disable-hi-animation.reg"
    powershell.exe -executionpolicy bypass -file "C:\Temp\Win10_1909\Post\Disable_OOBE_Stuff.ps1"

    ::Install M73 Video Driver
    wmic csproduct get version | findstr /i "ThinkCentre M73"
    If not %errorlevel% ==0 goto M73 else (goto M700)
    :M73
    cmd /c "C:\Temp\Win10_1909\M73\driver.cmd"


    :M700
    ::Install M700 Video Driver
    wmic csproduct get version | findstr /i "ThinkCentre M700"
    If not %errorlevel% ==0 goto End2
    :End2
    cmd /c "C:\Temp\Win10_1909\M700\driver.cmd"
    cscript C:\Windows\System32\slmgr.vbs /ATO
    GPUPDATE /force
    ::Install Lenovo System Update
    cmd /c C:\temp\Win10_1909\Post\Lenovo_System_Update.cmd

    ::execute Debloat Windows script
    powershell.exe -executionpolicy bypass -file "C:\Temp\Win10_1909\Post\Debloat_Windows_10v1809.ps1" -AppsOnly -AppAccess

    ::Register DNS
    ipconfig /registerdns

    ::Import default App Associations
    dism.exe /online /import-defaultappassociations:C:\temp\Win10_1909\Post\AppAssociations\AppAssociations.xml

    ::Force OCS Inventory Update
    "C:\Program Files (x86)\OCS Inventory Agent\OCSInventory.exe" /force
    "C:\Program Files\OCS Inventory Agent\OCSInventory.exe" /force

    ::Windows update installation KB4534273
    C:\Windows\System32\wusa.exe "C:\Temp\Win10_1909\Post\Windows_10_Version_1809_for_x64-based_Systems_(KB4534273).msu" /quiet /norestart /log:C:\Eurofins\Logs\Windows_10_Version_1809_for_x64-based_Systems_(KB4534273).evtx

    ::Windows 10 start menu customization
    powershell.exe -executionpolicy bypass Import-StartLayout -LayoutPath C:\Temp\Win10_1909\Post\Windows10_StartMenu.bin -MountPath C:\

    ::Windows 10 taskbar customization
    Reg.exe load HKEY_LOCAL_MACHINE\defuser C:\users\default\ntuser.dat
    Reg.exe import "C:\Temp\Win10_1909\Post\PinTaskBar\Win10_1909Taskbar.reg"
    Reg.exe unload HKEY_LOCAL_MACHINE\defuser
    Xcopy C:\Temp\Win10_1909\Post\PinTaskBar\*.lnk "C:\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar" /Q /Y /I

    ::Remove BUiltin Apps
    powershell.exe -executionpolicy bypass -file C:\temp\Win10_1909\Post\Remove-BuiltinApps.ps1
    powershell.exe -executionpolicy bypass -file C:\temp\Win10_1909\Post\Remove-UWP_Apps.ps1

    ::wait for postOOOBE to complete
    Timeout /T 180
    :: Delete the W10_Upgrade.cmd file to prevent task from running again
    Del /Q /S C:\Temp\Win10_1909\W10_Upgrade.cmd
    ::Del /S /S C:\Temp\Win10_1909\*.*
    ::Remove entire Win10_1909 folder
    RMDIR /S /Q C:\Temp\Win10_1909

    ::Install M73 Video Driver
    wmic csproduct get version | findstr /i "M73"
    If not %errorlevel% ==0 goto end
    :end
    C:\tempresdir\M73\igxpin.exe -s

    ::Install M700 Video Driver
    wmic csproduct get version | findstr /i "M73"
    If not %errorlevel% ==0 goto end
    :end

    C:\TempRESDir\M700\igxpin.exe -s

    As mentioned, this is my folder structure. Keep in mind, I used the setupconfig.ini file

     

    0