Restart PC In Post-Setup

behzad.tiktak

New Member
Hi everyone

Some update (windows 7) not be integrated in NTLite if you put on "Updates" (Such as ESU), so I created some update in "Post-Setup" and I shuold restart some update after install and many not.

I have a Question " After restart my PC, will be continue instalation in "Post-setup" or not and finished task?"
Some Update Such As:
WMF 5.1 - KB3191566
2020-01 Preview Monthly Quality Rollup - KB4539601
 

Attachments

  • Image 005.jpg
    Image 005.jpg
    241.4 KB
Post-Setup (Machine) commands are executed by a single script, SetupComplete.cmd

When a script command starts a reboot, Windows will not resume the script. Some users will do this:
- Run installers in /norestart mode.
- Run "shutdown /r /t 3" command as the last line. Windows reboots, and resumes at the first logon screen.

KB4539601 can be integrated in W7, because it's a re-release of KB4530734 with the wallpaper fix.
 
Post-Setup (Machine) commands are executed by a single script, SetupComplete.cmd

When a script command starts a reboot, Windows will not resume the script. Some users will do this:
- Run installers in /norestart mode.
- Run "shutdown /r /t 3" command as the last line. Windows reboots, and resumes at the first logon screen.

KB4539601 can be integrated in W7, because it's a re-release of KB4530734 with the wallpaper fix.
Hello my friend, I was hoped found one way to resume "Post-Setup" after restart.
any way ... Tank you my friend.
 
You might not understand this answer, but it's shared for everyone reading.

If you write your own autounattend.xml (or add lines to NTLite's version), <RunSynchronousCommand> will keep track of commands in a specific order, and <WillReboot> forces a reboot when needed. After reboot, Windows runs the next command in numbered order.

The specialize pass runs before OOBE, but is one of the only places where you can safely reboot and not lose your place.

Partial example in XML:
Code:
    <settings pass="specialize">
        <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>
                <!-- Comment the following if you don't need VMWare tools -->
                <RunSynchronousCommand wcm:action="add">
                    <Order>1</Order>
                    <Path>E:\setup64.exe /s /v "/qn REBOOT=ReallySuppress" /l C:\Windows\Temp\vmware_tools_install.log</Path>
                    <Description>Install VMWare tools</Description>
                    <WillReboot>Always</WillReboot>
                </RunSynchronousCommand>
                <!-- Download Cloudbase-Init -->
                <RunSynchronousCommand wcm:action="add">
                    <Order>2</Order>
                    <Path>powershell -NoLogo -Command "Invoke-WebRequest -Uri http://www.cloudbase.it/downloads/CloudbaseInitSetup_Beta.msi -OutFile C:\Windows\Temp\CloudbaseInitSetup_Beta.msi"</Path>
                    <Description>Download Cloudbase-Init Setup</Description>
                </RunSynchronousCommand>
                <!-- Download and install various utilities -->
                <RunSynchronousCommand wcm:action="add">
                    <Order>3</Order>
                    <Path>powershell -NoLogo -Command "Invoke-WebRequest -Uri https://raw.github.com/cloudbase/unattended-setup-scripts/master/DeployTools.ps1 -OutFile C:\Windows\Temp\DeployTools.ps1"</Path>
                    <Description>Download tools deployment script</Description>
                </RunSynchronousCommand>
                <RunSynchronousCommand wcm:action="add">
                    <Order>4</Order>
                    <Path>powershell -NoLogo -ExecutionPolicy RemoteSigned -File C:\Windows\Temp\DeployTools.ps1</Path>
                    <Description>Execute tools deployment script</Description>
                </RunSynchronousCommand>
            </RunSynchronous>
        </component>
    </settings>

When using autounattend.xml, you must copy any executable files to the ISO folder's sources\$OEM$ directory yourself since NTLite won't do it for anything not listed in Post-Setup commands.

sources\$OEM$\$1 = C:\ folder
sources\$OEM$\$1\Path\Files = C:\Path\Files
 
Back
Top