PSADT messing with other windows topmost status?

I am currently trying to get PSADT to work within our existing deployment environment, that is OPSI.

I am currently having one issue, OPSI shows a fullscreen window that is set to be topmost during the whole deployment process, so that the user isn’t messing with stuff while setups run.

Now, PSADT appears to remove that topmost status and move the window all the way to bottom, which is really bad.

What is going on and why? Is there any way to prevent that from happening?

So it seems that your “fullscreen window” curtain is being breached by PSADT.

Why not change PSADT’s DeployMode to silent?

Yea but why does it “breach” it?

I really want to keep the PSADT GUI. Ontop of our existing GUI.

Is there really noone here who can answer my question?

Now I see what you want.

You should be able to remove the TopMost attribute from the popups you want but you’ll need to edit the AppDeployToolkitMain.ps1 file. I think it’s all in the Show-xxx functions. (Disclaimer: I didn’t look)

This occurs long before any PSADT window is shown.

I just tried by removing all PSADT window popups from my DeployApplication.ps1, it still drops the topmost window all the way to bottom. At the end, when PSADT is finished, it restores the old topmost state.

So i assume this is something PSADT does on purpose, yet i can’t find it in any of the script files. I need this to be an option i can toggle off.

To clearify, I want our existing window to be topmost, and i want PSADT to be topmost, ontop of our window.

Maybe try to bring your “existing window” (aka Curtain or background) into the DeployApplication.ps1 and see what happens.

Other than that, it might be an OPSI feature to relinquish TopMost to the GUI of an app OPSI launches.
Talk to the OPSI people.

:wave: FOR THE CURIOUS: OPSI is an alternative to SCCM :point_right: opsi download | SourceForge.net

bring an “existing window” into a powershell script?
i have zero clue what you’re talking about.

as i said, it even happens without any PSADT GUI, for example if i set DeployMode to silent.
so OPSI has no GUI to relinquish topmost to.

i really just want an official statement if this behaviour is caused by PSADT,
and if yes if it is by design,
and if yes if there is any chance to make it optional.

this is the logfile from my latest attempt, deploymode silent.

[05-03-2022 17:09:59.620] [Initialization] [PSAppDeployToolkit] [Info] :: *******************************************************************************
[05-03-2022 17:09:59.620] [Initialization] [PSAppDeployToolkit] [Info] :: *******************************************************************************
[05-03-2022 17:09:59.787] [Initialization] [PSAppDeployToolkit] [Info] :: [MicrosoftCorporation_Powershell7_7.2.3_32+64-Bit_de_01] setup started.
[05-03-2022 17:09:59.997] [Initialization] [PSAppDeployToolkit] [Info] :: Script [C:\opsi.org\tmp\powershell\AppDeployToolkit\AppDeployToolkitMain.ps1] dot-source invoked by [C:\opsi.org\tmp\powershell\Deploy-Application.ps1]
[05-03-2022 17:10:00.140] [Initialization] [PSAppDeployToolkitExt] [Info] :: Script [C:\opsi.org\tmp\powershell\AppDeployToolkit\AppDeployToolkitExtensions.ps1] dot-source invoked by [C:\opsi.org\tmp\powershell\AppDeployToolkit\AppDeployToolkitMain.ps1]
[05-03-2022 17:10:00.218] [Initialization] [PSAppDeployToolkit] [Info] :: [MicrosoftCorporation_Powershell7_7.2.3_32+64-Bit_de_01] script version is [1.0]
[05-03-2022 17:10:00.226] [Initialization] [PSAppDeployToolkit] [Info] :: [MicrosoftCorporation_Powershell7_7.2.3_32+64-Bit_de_01] script date is [Wed, 27 Apr 2022 11:45:02 +0200]
[05-03-2022 17:10:00.234] [Initialization] [PSAppDeployToolkit] [Info] :: [MicrosoftCorporation_Powershell7_7.2.3_32+64-Bit_de_01] script author is [Lars Grünheid]
[05-03-2022 17:10:00.241] [Initialization] [PSAppDeployToolkit] [Info] :: [Deploy Application] script version is [3.8.4]
[05-03-2022 17:10:00.263] [Initialization] [PSAppDeployToolkit] [Info] :: The following non-default parameters were passed to [Deploy Application]: [-DeploymentType "Install" -DeployMode "Silent"]
[05-03-2022 17:10:00.332] [Initialization] [PSAppDeployToolkit] [Info] :: [App Deploy Toolkit Main] script version is [3.8.4]
[05-03-2022 17:10:00.376] [Initialization] [PSAppDeployToolkit] [Info] :: The following non-default parameters were passed to [App Deploy Toolkit Main]: [-ReferredLogName "20220503-170946_Microsoft Corporation_Powershell 7_7.2.3_32+64-Bit_PSADT.log"]
[05-03-2022 17:10:00.418] [Initialization] [PSAppDeployToolkit] [Info] :: [App Deploy Toolkit Extensions] version is [3.8.4]
[05-03-2022 17:10:00.461] [Initialization] [PSAppDeployToolkit] [Info] :: Computer Name is [TEST1]
[05-03-2022 17:10:00.579] [Initialization] [PSAppDeployToolkit] [Info] :: Current User is [NT-AUTORITÄT\SYSTEM]
[05-03-2022 17:10:00.620] [Initialization] [PSAppDeployToolkit] [Info] :: OS Version is [Microsoft Windows 10 Enterprise 64-bit 10.0.19044.1526]
[05-03-2022 17:10:00.700] [Initialization] [PSAppDeployToolkit] [Info] :: OS Type is [Workstation]
[05-03-2022 17:10:00.748] [Initialization] [PSAppDeployToolkit] [Info] :: Current Culture is [de-DE], language is [DE] and UI language is [DE]
[05-03-2022 17:10:01.897] [Initialization] [PSAppDeployToolkit] [Info] :: Hardware Platform is [Virtual]
[05-03-2022 17:10:01.917] [Initialization] [PSAppDeployToolkit] [Info] :: PowerShell Host is [ConsoleHost] with version [5.1.19041.1320]
[05-03-2022 17:10:01.923] [Initialization] [PSAppDeployToolkit] [Info] :: PowerShell Version is [5.1.19041.1320 x64]
[05-03-2022 17:10:01.929] [Initialization] [PSAppDeployToolkit] [Info] :: PowerShell CLR (.NET) version is [4.0.30319.42000]
[05-03-2022 17:10:01.935] [Initialization] [PSAppDeployToolkit] [Info] :: *******************************************************************************
[05-03-2022 17:10:03.090] [Initialization] [PSAppDeployToolkit] [Info] :: Display session information for all logged on users: 


NTAccount           : TEST1\civ_admTEST1
SID                 : S-1-5-21-942422053-1544221215-105073297-1001
UserName            : civ_admTEST1
DomainName          : TEST1
SessionId           : 1
SessionName         : Console
ConnectState        : Active
IsCurrentSession    : True
IsConsoleSession    : True
IsActiveUserSession : True
IsUserSession       : True
IsRdpSession        : False
IsLocalAdmin        : True
LogonTime           : 03.05.2022 17:06:24
IdleTime            : 00:00:00
DisconnectTime      : 
ClientName          : 
ClientProtocolType  : 
ClientDirectory     : 
ClientBuildNumber   : 0




[05-03-2022 17:10:03.097] [Initialization] [PSAppDeployToolkit] [Info] :: The following users are logged on to the system: [TEST1\civ_admTEST1].
[05-03-2022 17:10:03.113] [Initialization] [PSAppDeployToolkit] [Info] :: Current process is running with user account [NT-AUTORITÄT\SYSTEM] under logged in user session for [TEST1\civ_admTEST1].
[05-03-2022 17:10:03.119] [Initialization] [PSAppDeployToolkit] [Info] :: The following user is the console user [TEST1\civ_admTEST1] (user with control of physical monitor, keyboard, and mouse).
[05-03-2022 17:10:03.125] [Initialization] [PSAppDeployToolkit] [Info] :: The active logged on user is [TEST1\civ_admTEST1].
[05-03-2022 17:10:03.131] [Initialization] [PSAppDeployToolkit] [Info] :: The active logged on user [TEST1\civ_admTEST1] has a primary UI language of [DE].
[05-03-2022 17:10:03.137] [Initialization] [PSAppDeployToolkit] [Info] :: The following UI messages were imported from the config XML file: [UI_Messages_DE].
[05-03-2022 17:10:03.151] [Initialization] [PSAppDeployToolkit] [Info] :: The active logged on user [TEST1\civ_admTEST1] has a DPI scale factor of [100] with DPI pixels [96].
[05-03-2022 17:10:03.196] [Initialization] [PSAppDeployToolkit] [Info] :: Unable to load COM Object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence.
[05-03-2022 17:10:10.738] [Initialization] [Test-ServiceExists] [Info] :: Service [Schedule] exists.
[05-03-2022 17:10:10.955] [Initialization] [Get-ServiceStartMode] [Info] :: Get the service [Schedule] startup mode.
[05-03-2022 17:10:11.377] [Initialization] [Get-ServiceStartMode] [Info] :: Service [Schedule] startup mode is set to [Automatic].
[05-03-2022 17:10:11.455] [Initialization] [Start-ServiceAndDependencies] [Info] :: Get the service object for service [Schedule].
[05-03-2022 17:10:12.997] [Initialization] [Start-ServiceAndDependencies] [Info] :: Service [Schedule] with display name [Aufgabenplanung] has a status of [Running].
[05-03-2022 17:10:13.041] [Initialization] [PSAppDeployToolkit] [Info] :: The task scheduler service is in a healthy state: True.
[05-03-2022 17:10:13.069] [Initialization] [PSAppDeployToolkit] [Info] :: Session 0 detected, process running in user interactive mode, user(s) logged in.
[05-03-2022 17:10:13.087] [Initialization] [PSAppDeployToolkit] [Info] :: Installation is running in [Silent] mode.
[05-03-2022 17:10:13.107] [Initialization] [PSAppDeployToolkit] [Info] :: Deployment type is [Installation].
[05-03-2022 17:10:13.453] [Pre-Installation] [Get-RunningProcesses] [Info] :: Check for running applications: [pwsh]
[05-03-2022 17:10:13.665] [Pre-Installation] [Get-RunningProcesses] [Info] :: Specified applications are not running.
[05-03-2022 17:10:13.868] [Pre-Installation] [Show-InstallationWelcome] [Info] :: Evaluate disk space requirements.
[05-03-2022 17:10:13.924] [Pre-Installation] [Get-FreeDiskSpace] [Info] :: Retrieve free disk space for drive [C:].
[05-03-2022 17:10:14.072] [Pre-Installation] [Get-FreeDiskSpace] [Info] :: Free disk space for drive [C:]: [46838 MB].
[05-03-2022 17:10:14.295] [Pre-Installation] [Show-InstallationWelcome] [Info] :: Successfully passed minimum disk space requirement check.
[05-03-2022 17:10:14.828] [Installation] [Show-InstallationProgress] [Info] :: Bypassing Show-InstallationProgress [Mode: Silent]. Status message:Installiere PowerShell 7.2.3 64-Bit
[05-03-2022 17:10:15.131] [Installation] [Get-MsiTableProperty] [Info] :: Read data from Windows Installer database file [C:\opsi.org\tmp\powershell\Files\PowerShell-7.2.3-win-x64.msi] in table [Property].
[05-03-2022 17:10:16.336] [Installation] [Get-InstalledApplication] [Info] :: Get information for installed Product Code [{4CD2445F-F6A9-4143-BBED-AFBAFD8EB3DC}]...
[05-03-2022 17:10:16.741] [Installation] [Get-InstalledApplication] [Info] :: Skipped 0 entries while searching, because they were considered Microsoft updates.
[05-03-2022 17:10:16.790] [Installation] [Get-InstalledApplication] [Info] :: Found no application based on the supplied parameters.
[05-03-2022 17:10:16.822] [Installation] [Execute-MSI] [Info] :: Executing MSI action [Install]...
[05-03-2022 17:10:17.030] [Installation] [Execute-Process] [Info] :: [C:\Windows\System32\msiexec.exe] is a valid fully qualified path, continue.
[05-03-2022 17:10:17.175] [Installation] [Test-IsMutexAvailable] [Info] :: Check to see if mutex [Global\_MSIExecute] is available. Wait up to [10 minute(s)] for the mutex to become available.
[05-03-2022 17:10:17.317] [Installation] [Test-IsMutexAvailable] [Info] :: Mutex [Global\_MSIExecute] is available for an exclusive lock.
[05-03-2022 17:10:18.504] [Installation] [Execute-Process] [Info] :: Working Directory is [C:\opsi.org\tmp\powershell\Files].
[05-03-2022 17:10:18.517] [Installation] [Execute-Process] [Info] :: Executing [C:\Windows\System32\msiexec.exe /i "C:\opsi.org\tmp\powershell\Files\PowerShell-7.2.3-win-x64.msi" /quiet REBOOT=ReallySuppress /log "C:\opsi.org\log\pkg\20220503-171014_Microsoft Corporation_Powershell 7_7.2.3_64-Bit_Install.log"]...
[05-03-2022 17:10:48.372] [Installation] [Execute-Process] [Info] :: Execution completed successfully with exit code [0].
[05-03-2022 17:10:48.388] [Installation] [Update-Desktop] [Info] :: Refresh the Desktop and the Windows Explorer environment process block.
[05-03-2022 17:10:49.900] [Installation] [Show-InstallationProgress] [Info] :: Bypassing Show-InstallationProgress [Mode: Silent]. Status message:Installiere PowerShell 7.2.3 32-Bit
[05-03-2022 17:10:49.937] [Installation] [Get-MsiTableProperty] [Info] :: Read data from Windows Installer database file [C:\opsi.org\tmp\powershell\Files\PowerShell-7.2.3-win-x86.msi] in table [Property].
[05-03-2022 17:10:50.195] [Installation] [Get-InstalledApplication] [Info] :: Get information for installed Product Code [{749D8748-450A-4AC2-B37F-6DB55C7F4D9B}]...
[05-03-2022 17:10:50.241] [Installation] [Get-InstalledApplication] [Info] :: Skipped 0 entries while searching, because they were considered Microsoft updates.
[05-03-2022 17:10:50.290] [Installation] [Get-InstalledApplication] [Info] :: Found no application based on the supplied parameters.
[05-03-2022 17:10:50.341] [Installation] [Execute-MSI] [Info] :: Executing MSI action [Install]...
[05-03-2022 17:10:50.458] [Installation] [Execute-Process] [Info] :: [C:\Windows\System32\msiexec.exe] is a valid fully qualified path, continue.
[05-03-2022 17:10:50.579] [Installation] [Test-IsMutexAvailable] [Info] :: Check to see if mutex [Global\_MSIExecute] is available. Wait up to [10 minute(s)] for the mutex to become available.
[05-03-2022 17:10:50.626] [Installation] [Test-IsMutexAvailable] [Info] :: Mutex [Global\_MSIExecute] is available for an exclusive lock.
[05-03-2022 17:10:51.690] [Installation] [Execute-Process] [Info] :: Working Directory is [C:\opsi.org\tmp\powershell\Files].
[05-03-2022 17:10:51.701] [Installation] [Execute-Process] [Info] :: Executing [C:\Windows\System32\msiexec.exe /i "C:\opsi.org\tmp\powershell\Files\PowerShell-7.2.3-win-x86.msi" /quiet REBOOT=ReallySuppress /log "C:\opsi.org\log\pkg\20220503-171049_Microsoft Corporation_Powershell 7_7.2.3_32-Bit_Install.log"]...
[05-03-2022 17:11:24.976] [Installation] [Execute-Process] [Info] :: Execution completed successfully with exit code [0].
[05-03-2022 17:11:24.993] [Installation] [Update-Desktop] [Info] :: Refresh the Desktop and the Windows Explorer environment process block.
[05-03-2022 17:11:27.750] [Post-Installation] [Close-InstallationProgress] [Info] :: Bypassing Close-InstallationProgress [Mode: Silent]
[05-03-2022 17:11:27.881] [Post-Installation] [Exit-Script] [Info] :: MicrosoftCorporation_Powershell7_7.2.3_32+64-Bit_de_01 Installation completed with exit code [0].
[05-03-2022 17:11:27.898] [Post-Installation] [Exit-Script] [Info] :: -------------------------------------------------------------------------------

My apologies for my understanding of the source of the “fullscreen window”. I just re-read your first post and it mentions that OPSI is the one creating the fullscreen window.

As far as I know, PSADT does not play with TopMost status of other windows.
Regardless it seems that something is minimizing OPSI’s fullscreen window.
It could be:
-Standard Windows behaviour in regards to the TopMost status.
-OPSI’s behaviour to minimize its own fullscreen window

That said, you could:
-See if a setting in OPSI exists to control the fullscreen window behaviour.
-Try to mimic OPSI’s fullscreen window inside of PSADT. (would require to add GUI code and might not work)
-Maximize OPSI’s minimized fullscreen window from inside PSADT. (would require fancy code or utility)

PS: I assume your last PSADT test with DeployMode to silent did have OPSI’s fullscreen window showing.

As far as I know, PSADT does not play with TopMost status of other windows.

That’s why i would appreciate an answer from an actual developer, no offense.
Edit: i just read your profile and realized you are actually developing on your own fork, so i suspect you’d know how PSADT works. My bad.

Still, not really looking promising, it appears the official developers abandoned this website.
Last update was 1 1/2 years ago… Not sure how i feel about using PSADT as one of the main pillars of our deployment management now, but it’s not my decission anyways.

-Standard Windows behaviour in regards to the TopMost status.
-OPSI’s behaviour to minimize its own fullscreen window

I’m sure I’ve had multiple topmost windows in Windows before and they worked as expected.
It only happens when i use OPSI in combination with PSADT. To rule these two out, I will try another application, unrelated to PSADT, with OPSI and see how that works.

PS: I assume your last PSADT test with DeployMode to silent did have OPSI’s fullscreen window showing.

No, see my answer above:

as i said, it even happens without any PSADT GUI, for example if i set DeployMode to silent.
so OPSI has no GUI to relinquish topmost to.

RE: “i would appreciate an answer from an actual developer,”

Well I did contribute the original Set-ActiveSetup function and got some additional logging features into PSADT. I wanted log merging but they didn’t, so I forked. I was offered to become an official DEV at one time but turned it down due to my flakyness, me not knowing C++ or how to do code pulls. You can try to reach out directly to the developers but they have real jobs too and I suspect some have moved on.

On that note, I believe we are assuming PSADT is minimizing OPSI’s fullscreen window.
What happens when you launch other EXEs or PS1s with OPSI?

There are also 3 ways to launch a PSADT script:
-the DeployApplication.ps1 directly
-DeployApplication.exe
-ServiceUI.EXE

I am not sure if this makes sense, but I would try to add the argument -MinimizeWindows:$false to the call of Show-InstallationWelcome. May be “not minimizing everything else” will achieve what you want.

Hi,

after some excessive testing, it turns out that the OPSI window actually does show some wierd behaviour in certain situations, and that the issue in fact seems to be on the OPSI end.

i guess i will have to move on to your suggestion, build a new fullscreen window inside PSADT, more likely less trouble that way.

was literally the first thing i tried

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.