Lenovo does not know or care that you are using PowerShell + PSADT.
Here Lenovo assumes everybody knows CMD or BAT file and are one-liner experts.
Your ONE line is actually 2 commands linked with a conditional operator &.
Translating WINUPTP.exe -s to PowerShell + PSADT you get:
This will only work if you have WINUPTP.exe in the \Files\ folder. (PSADT will look in \Files\ folder by default)
You don’t need to use shutdown.exe /r /t 0 because PSADT has it’s own way to reboot the computer. Look in PSAppDeployToolkit.pdf for Show-InstallationRestartPrompt
Based on that logging, it does not appear you implemented the “Show-InstallationRestartPrompt” part but here is what I have done with success in the past with HP BIOS updates.
This is more manual but I am not blindly forcing BIOS updates on systems that do not need it.
First I get the BIOS version and model of the computer:
I used the -IgnoreExitCodes option and got it past the exit code 1 point of failure.
I then get prompted with the dialog window from these lines:
Display a message at the end of the install
If (-not $useDefaultMsi) { Show-InstallationPrompt -Message 'You can customize text to appear at the end of an install or remove it completely for unattended installations.' -ButtonRightText 'OK' -Icon Information -NoWait }
I then click OK but nothing happens.
I do have the "Show-InstallationRestartPrompt” command in the script, but as you mentioned, it’s not working. I have it in the post install section. Is that not where it goes?
I also see this feedback in the script, but I never see the countdown and it never restarts
[07-17-2021 19:52:51.463] [Post-Installation] [Show-InstallationRestartPrompt] :: Invoking Show-InstallationRestartPrompt asynchronously with a [61] second countdown…
…but I never see the countdown and it never restarts
Check the log file and make sure it says something like this:
[06-01-2020 09:57:24.551] [Initialization] [PSADT] [Info] :: Installation is running in [Interactive] mode.
no interactive, no countdown GUI.
BTW: The log file is your eyes. Make it work for you when you write your install scripts.
Thanks for the tip… Searching the logs yields these three lines, so I don’t know which to believe. I do see the deferment popup dialog window, so that tells me it’s in interactive mode? No?
[Initialization] :: Session 0 detected, process not running in user interactive mode; deployment mode set to [NonInteractive].
PSAppDeployToolkit
7/20/2021 11:45:25 AM
5144 (0x1418)
[Initialization] :: Installation is running in [NonInteractive] mode.
PSAppDeployToolkit
7/20/2021 11:45:25 AM
5144 (0x1418)
[Initialization] :: Session 0 detected, process running in user interactive mode, user(s) logged in. PSAppDeployToolkit 7/20/2021 11:53:54 AM 1464 (0x05B8)
The log file you just posted actually say [NonInteractive] so no.
I don’t use deferments but I assume it’s launched by a scheduled task in the user’s context (aka runs as the user). That’s why you can see the deferment popups.
Your actual deployment, however, is running in the SYSTEM context. To make it visible you need to do 2 things:
In SCCM, you have to check the box for “Allow users to view and interact with the program installation” in the Deployment Type → User Experience tab
In the Deployment Type → Programs tab, for the Installation program, you’ll have to add these parameters at the end: Install Interactive