Post-Setup commands do not work

mitchvg

New Member
Messages
2
Reaction score
1
Hi,

I'm trying to create a image with everything included. But I cannot seem to get this last couple of post setup commands working. I'm using a Windows 11 24H2 English x64 base image. And with every install it seems to not execute the command and therefor getting stuck. If I manually enter the command it works without issues. Maybe i'm not entering the commands right in Post Setup? Probably something stupid, but I already tried for 2 months, many changes, so hopefully I can get some help.

I have moved the non working commands to after logon (but want to use them eventually in before logon), and this is the picture I get stuck with. If i press the exact command in this window, it works. When I close the CMD window, it opens it again for the next CMD step, but again without any action/command.

So these are the commands which dont seem to work:
1. Cmd "%PROGRAMFILES(X86)%\Common Files\Adobe AIR\Versions\1.0\Adobe AIR Application Installer.exe" -silent -eulaAccepted -desktopShortcut "%SYSTEMROOT%\Setup\Kronos-1.49.air"
2. Cmd "%SYSTEMROOT%\Setup\Install ATEM v9.6.3.exe" /install /quiet /norestart
3. Powershell Get-Item -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run | Remove-ItemProperty -Name com.squirrel.Teams.Teams -ErrorAction SilentlyContinue
 

Attachments

  • Scherm­afbeelding 2025-02-23 om 13.05.33.jpg
    Scherm­afbeelding 2025-02-23 om 13.05.33.jpg
    662.3 KB
  • Scherm­afbeelding 2025-02-23 om 13.11.10.jpg
    Scherm­afbeelding 2025-02-23 om 13.11.10.jpg
    399.1 KB
1. For running an app installer, you can add the .EXE directly as a file instead of calling it from CMD.
File / Add, and copy the desired parameters into the highlighted yellow box.​

1740330604991.png

TaskParameters
Adobe AIR Application Installer.exe-silent -eulaAccepted -desktopShortcut "%SYSTEMROOT%\Setup\Kronos-1.49.air"

The correct syntax for running any EXE from CMD is "cmd /c installer.exe options options".

2. PS commands should be wrapped in quotes, if you have reserved characters like | or &.
NTLite is creating a command line which will be finally passed to a CMD shell.​

TaskParameters
powershell"Get-Item -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run | Remove-ItemProperty -Name com.squirrel.Teams.Teams -ErrorAction SilentlyContinue"
 
Great, thanks.

I changed it a bit more, but it works now! The Adobe Air application is previously in the post-setup installed, so therefor i use this 'long' reference via programfiles.

Result:
TaskParameters
"%PROGRAMFILES(X86)%\Common Files\Adobe AIR\Versions\1.0\Adobe AIR Application Installer.exe"-silent -eulaAccepted -desktopShortcut "%SYSTEMROOT%\Setup\Kronos-1.49.air"
"%SYSTEMROOT%\Setup\Install ATEM v9.6.3.exe"/install /quiet /norestart
Powershell"-ExecutionPolicy Bypass -Command "Get-Item -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run | Remove-ItemProperty -Name com.squirrel.Teams.Teams -ErrorAction SilentlyContinue""
 
Back
Top