How to use Provisioning to run sysprep (Windows 64bit).

Version 1

    Verified Product Versions

    Endpoint Manager 9.5Endpoint Manager 9.6Endpoint Manager 2016.xEndpoint Manager 2017.x

    How To:

    Usually, when using provisioning to execute a file you have to point to the exact location of the file. Sysprep, however, is located in Windows\Sytem32\Sysprep folder and when we will try to run in with help of provisioning (which runs in 32-bit mode) the call will be redirected and it will fail.


    In 64-bit Windows, if a 32-bit application includes the "\System32" folder name in a folder path, the system automatically makes a redirection to the SysWOW64.


    You can find more information on the redirection in official Microsoft document here


    Instead of running

    'c:\windows\system32\sysprep\sysprep.exe /oobe /shutdown'

    we should be running 'c:\windows\sysnative\sysprep\sysprep.exe /oobe /shutdown'.


    When we are running C:\Windows\Sysnative then C:\Windows\System32 path is actually being used. The 'Sysnative' folder allows accessing 64-bit tools with the usage of 32-bit code.


    Step by Step:

    1. In the console navigate to Tools - Provisioning - OS Provisioning.

    2. Create the desired template and add 'Execute File' action.

    3. Target path and file name should point to 'c:\windows\sysnative\sysprep\sysprep.exe'.

    4. Command line parameters '/oobe /shutdown'.