Running automatically some commands when the installation of Windows 8.x ends

Hi

I should have run automatically some commands when the installation of Windows 8.x ends.

How do I do this?

Thanks

February 27th, 2015 2:49am

Hello,

What commands you want to run and what's your aim? As soon as the installation finishes, you'll be rebooted only. 

Regards.

Free Windows Admin Tool Kit Click here and download it now
February 27th, 2015 7:36am

Hello,

What commands you want to run and what's your aim? As soon as the installation finishes, you'll be rebooted only. 

Re

February 27th, 2015 11:59am

I should have run automatically some commands when the installation of Windows 8.x ends.

https://technet.microsoft.com/en-us/library/hh825167.aspx
Free Windows Admin Tool Kit Click here and download it now
February 27th, 2015 6:33pm

The SetupComplete.cmd file is executed at the end of the installation process of any edition of Windows 8.x Retail and OEM?

That, I don't know, because I never use Retail/OEM builds.
Maybe somebody else knows, or, you could just try it.
Free Windows Admin Tool Kit Click here and download it now
March 2nd, 2015 8:05pm

Hi balubeto

I thinks it is related to product key type. As I know, In Windows 8, oobe.cmd and Setupcomplete.cmd are disabled if an OEM product key is used. This is to ensure that end users reach Start as quickly as possible. Any tools or services that use this infrastructure need to be moved to post Out-Of-Box Experience (OOBE) tasks.

Regards

D. Wu

March 4th, 2015 8:21pm

Hi balubeto

I thinks it is related to product key type. As I know, In Windows 8, oobe.cmd and Setupcomplete.cmd are disabled if an OEM product key is used. This is to ensure that end users reach Start as quickly as possible. Any tools or services that use this infrastructure need to be moved to post Out-Of-Box Experience (OOBE) tasks.

Regards

D. Wu

So, what would be the proper procedure to make sure that, at the end of the installation process and regardless of the type of the product key used in this process, some commands can be run properly with a system restart at the end of their execution?

Thanks

Bye

Free Windows Admin Tool Kit Click here and download it now
March 5th, 2015 3:00am

Hi balubeto,

You could use SetupComplete.cmd on any edition of Windows I think, but you could and should not expect that a non OEM edition Windows or re-image OEM windows could be activated by OEM key. I suppose that is the reason why it is disabled by design if you use an OEM key. If you need re-image a Windows OEM edition, you might need to check this with OEM manufacturer since it belongs to manufacturers.

Regards

D. Wu

March 8th, 2015 9:49pm

Hi balubeto,

You could use SetupComplete.cmd on any edition of Windows I think, but you could and should not expect that a non OEM edition Windows or re-image OEM windows could be activated by OEM key. I suppose that is the reason why it is disabled by design if you use an OEM key. If you need re-image a Windows OEM edition, you might need to check this with OEM manufacturer since it belongs to manufacturers.

Regards

D. Wu

If I put this Autounattend.xml file in the root directory of a DVD of Windows 8.x:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-Shell-Setup" 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">
            <FirstLogonCommands>
                <SynchronousCommand wcm:action="add">
                    <Order>1</Order>
                    <RequiresUserInput>false</RequiresUserInput>
                    <CommandLine>%WINDIR%\Setup\Scripts\SetupComplete.cmd</CommandLine>
                    <Description>Enables the execution of the SetupComplete.cmd file for the Retail and OEM licenses.</Description>
                </SynchronousCommand>
            </FirstLogonCommands>
        </component>
    </settings>
    <xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

the commands inserted in the SetupComplete.cmd file will run only once regardless of its type of license. Right?

Thanks

Bye

Free Windows Admin Tool Kit Click here and download it now
March 9th, 2015 1:01pm

I am waiting for your answer.

Thanks

Bye

March 11th, 2015 6:33am

Hi balubeto,

Sorry for my late reply, I need to do some test on my machine. Unfortunately we have no rights to do these test on OEM machine and OEM key. If you need re-image an OEM edition Windows. You might need to refer to OEM manufacturers for more information. OR as Don mentioned that just give it a try.

Synchronous Command definitely works under normal circumstances, and here are some samples.

https://technet.microsoft.com/en-us/library/cc766494%28v=ws.10%29.aspx?f=255&MSPPError=-2147217396

Regards

D. Wu

Free Windows Admin Tool Kit Click here and download it now
March 11th, 2015 9:07pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics