Forum Discussion
TalosTech
Jun 21, 2023Copper Contributor
Login Script to Popup a Windows Form
Hi, I am trying to popup a form via a PowerShell login script (User Configuration) but the form is getting supressed even when using: $form.Topmost = $true Does anyone know a way via PowerS...
Andres-Bohren
Jun 21, 2023Iron Contributor
Hi
>I'd like to avoid using the "Run logon scripts visible" setting since its not the only script running and the form will only display when certain criteria are met.
I understand - but that seems exactly the problem here
#Start the Process > Window is shown
Start-Process powershell.exe "-noprofile .\topmost.ps1"
#Start Process hidden Window > No Window is shown
Start-Process powershell.exe "-noprofile .\topmost.ps1" -WindowStyle hidden
Does exactly what told: "Run logon scripts visible = false" > Do not show any windows 😉
Regards
Andres
>I'd like to avoid using the "Run logon scripts visible" setting since its not the only script running and the form will only display when certain criteria are met.
I understand - but that seems exactly the problem here
#Start the Process > Window is shown
Start-Process powershell.exe "-noprofile .\topmost.ps1"
#Start Process hidden Window > No Window is shown
Start-Process powershell.exe "-noprofile .\topmost.ps1" -WindowStyle hidden
Does exactly what told: "Run logon scripts visible = false" > Do not show any windows 😉
Regards
Andres
- TalosTechJun 22, 2023Copper ContributorHi,
Even with this GPO setting turned on the form is minimised and you have to click it in the start bar to get it to display. I need the form to popup for the user.