Run script multiple times

How do I have PSADT run the install portion of the script each time I run it even though it already ran and the app is installed? I found out I have a spelling error in part of my install line and I want to re-run it on clients even though it already ran and installed the software.

Depends on the installer or software. For exe installers that are okay with installing over-the-top as an upgrade method, just rerun it.

If the software doesn’t allow that, you could try using the -Repair option to uninstall/reinstall?

For MSI, it would be same as the above – uninstall/reinstall.

For the most part, it is the program/installer limitation over PSADT though.

The exe seems to let you install over itself. It worked when I manually ran the command. PSADT just flies past that step like it doesn’t even attempt it though.

[08-14-2020 14:55:12.390] [Installation] [Execute-Process] :: Executing [C:\windows\ccmcache\3r\Files\Setup.exe /install /quiet ACCEPTEULA=1 STARTMENUSHORTCUT=1 REMOVEINSTALLEDAPP=1]...
[08-14-2020 14:55:12.830] [Installation] [Execute-Process] :: Execution completed successfully with exit code [0].

The log indicates that setup.exe ran and exited cleanly with a 0 exit code.

When you manually ran it, what did it display (if anything) and in what user context vs the script’s context?

It didn’t display anything. As for the user context, I ran it as a domain administrator. The script runs in the system context I believe.

It does the same even if I uninstall it first using Programs and Features.

Are you running it through ServiceUI/PSExec when under the system context?

It is installing as system but I’m not using ServiceUI or PSExec.

Try using both together to see what the installer does. Some installers don’t run correctly without ‘seeing’ the desktop even in silent mode.