FirstLogonCommands funktioniert nur bei 32-Bit-Architekturen

1056
Bas

Ich habe 2 Windows-Installationen, die identisch sind, dieselben Einstellungen, dieselben Programme. Der einzige Unterschied ist, dass die Windows-Architektur anders ist, die eine ist 32bit und die andere ist 64bit.

Wenn Sie meine 32-Bit-Installation mit der folgenden Antwortdatei synchronisiert haben:

<?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> 

Im Moment geht es nur um das FirstLogonCommandsTeil, das nach 32bit Sysprep völlig einwandfrei funktioniert. Der Befehl wird fehlerfrei ausgeführt und gibt das gewünschte Ergebnis zurück.

Wenn Sie die Antwortdatei für meine 64-Bit-Installation angepasst haben, sieht das so aus:

<?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> 

Das einzige, was umgekehrt wird, ist der passParameter der settingsTaste. Als ich diese Antwortdatei auf dem 64-Bit-Installations-Sysprep ausprobierte, wurde FirstLogonCommandssie nicht ausgeführt. Der Rest der Antwortdatei funktionierte perfekt, genau wie die 32-Bit-Version.

Beide Antwortdateien werden von WSIM geprüft.

Ich habe versucht, die Zeile vom zu kopieren <CommandLine> Schlüssel in ein CMD (mit oder ohne Administratorrechte) zu und dies auszuführen. Bei dieser Ausführung wird der Befehl nur fehlerfrei ausgeführt.

Das Problem ist, dass das Skript nicht auf meinem 64-Bit-Installations-Sysprep ausgeführt wird.

Wie kommt das und wie kann ich dieses Skript mithilfe dieser Antwortdatei ausführen lassen?

0
@LPChip Das hat mich total verwirrt. Es ist in der Tat ein Ordner, in dem ich eine Powershell usw. finden kann. Aber wie kann der Befehl dann in einer regulären cmd funktionieren? Bas vor 7 Jahren 0
Egal was ich vorhin geschrieben habe. Syswow64 ist die x86-Version des system32-Ordners. LPChip vor 7 Jahren 0
Ich sehe etwas, das dies verursachen könnte, und das ist das ProfilesDirectory. Es ist anders LPChip vor 7 Jahren 0
Das ist mein schlechtes Das `ProfilesDirectory` ist auf U: \ Users eingestellt, was auch bei der 32-Bit-Version gut funktioniert. Bas vor 7 Jahren 0
@LPChip Ja, ich habe es jetzt geändert. Aber wie kann so etwas passieren, wenn der Befehl nur in einem normalen cmd funktioniert? Bas vor 7 Jahren 0
Sorry, ich habe keine Ahnung. Ich suche hier nur nach Unstimmigkeiten. Sie könnten versuchen, die Ausführung des Skripts als x86 zu erzwingen, indem Sie den Ordner SYSWOW64 anstelle von System32 verwenden und prüfen, ob dies hilfreich ist. LPChip vor 7 Jahren 0
@LPChip Ich habe auch versucht, "-Force" am Ende der Kommandozeile zu platzieren. Das hat nicht geholfen, ich habe die Maschine auch auf die neuesten Updates aktualisiert, auch keine Ergebnisse. Bas vor 7 Jahren 0

0 Antworten auf die Frage