I've got 2 Windows installations which are identical, the same settings, the same programs. The only difference is that the Windows architecture is different, the one is 32bit and the other one is 64bit.

When having sysprepped my 32bit installation with the following answer file:

Code:
<?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="oobeSystem">
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <FolderLocations>
                    <ProfilesDirectory>U:\Users</ProfilesDirectory>
                </FolderLocations>
                <FirstLogonCommands>
                    <SynchronousCommand wcm:action="add">
                        <CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -ExecutionPolicy Bypass -File C:\Windows\System32\Scripts\PinTaskbarItems\Managetaskbar\Taskband.ps1</CommandLine>
                        <Description>Sets the pinned taskbar items and restarts the explorer process</Description>
                        <Order>1</Order>
                        <RequiresUserInput>false</RequiresUserInput>
                    </SynchronousCommand>
                </FirstLogonCommands>
            </component>
        </settings>
        <settings pass="specialize">
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <DesktopOptimization>
                    <ShowWindowsStoreAppsOnTaskbar>false</ShowWindowsStoreAppsOnTaskbar>
                </DesktopOptimization>
                <CopyProfile>true</CopyProfile>
                <DoNotCleanTaskBar>true</DoNotCleanTaskBar>
                <EnableStartMenu>true</EnableStartMenu>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="wim:c:/users/bas/desktop/iso&apos;s/x32/install.wim#Windows 10 Pro" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
It's currently only about the `FirstLogonCommands` part, which totally works fine after 32bit sysprep. The command runs without any errors and gives back the desired result.

When having adjusted the answer file for my 64bit installation, it looks like this:

Code:
<?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="specialize">
            <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">
                <DesktopOptimization>
                    <ShowWindowsStoreAppsOnTaskbar>false</ShowWindowsStoreAppsOnTaskbar>
                </DesktopOptimization>
                <CopyProfile>true</CopyProfile>
                <DoNotCleanTaskBar>true</DoNotCleanTaskBar>
                <EnableStartMenu>true</EnableStartMenu>
            </component>
        </settings>
        <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">
                <FolderLocations>
                    <ProfilesDirectory>U:\Users</ProfilesDirectory>
                </FolderLocations>
                <FirstLogonCommands>
                    <SynchronousCommand wcm:action="add">
                        <CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -ExecutionPolicy Bypass -File C:\Windows\System32\Scripts\PinTaskbarItems\Managetaskbar\Taskband.ps1</CommandLine>
                        <Description>Sets the pinned taskbar items and restarts the explorer process</Description>
                        <Order>1</Order>
                        <RequiresUserInput>false</RequiresUserInput>
                    </SynchronousCommand>
                </FirstLogonCommands>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="wim:e:/sources/install.wim#Windows 10 Pro" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
The only thing that's reversed is the `pass` parameter of the `settings` key. When I tried this answer file on the 64bit installation sysprep, the `FirstLogonCommands` did not run. The rest of the answer file worked perfectly, just as the 32bit version.

Both of the answer files are validated by WSIM.

I tried copying the line from the `<CommandLine>` key into a CMD (with or without administrator priveleges) and running this. When this run, the command just run without any errors.

The problem is that the script is not running on my 64bit installation sysprep.

How does this come and how can I make this script run by using this answer file?



I have also tried to replace the CommandLine with just a call to a CMD script which creates a directory, this didn't work aswell, where it did on the 32bit version.

When trying to run this script by hand via a regular CMD without admin privileges, it said permission denied. Does it have to do with system permissions on the Windows folder?

The command line option then looked like this:

<CommandLine>C:\Windows\System32\Scripts\myScript.cmd</CommandLine>

I am 100% sure the scripts are in place and are not containing any errors.