Launching script from GPO problem

I made a GUI that launches a Network Policy when the user logs in, this is done though GPO Logon Script. After the user “Accepts” the policy we have it minimize to the tray and when clicked on, it gives them info about their computer that we may ask them for so we want this script/gui to always be running.
The problem is this seems to leave the GPO “open” or running and will not update other policies at the next update interval.
Is there anyway I can have the GPO launch this script then let go of the GPO per say?


Not sure if this is of any help

Thanks for the reply. This is the way I have it setup and it does launch just fine and minimizes to the tray. The problem is that while its running (which we want to be all the time) the GPO never completes and never runs subsequent GPO checks.

ok another possible way :slight_smile: use gpo to copy a batch file and your ps1 script to the users startup folder. the .bat file will then launch your ps1 script on startup

Yeah, that would be my last resort as I didnt want to have to maintain 2 scripts for one reason :slight_smile:
I also thought I could make a “launcher” script that would run from GPO and the launcher script would call the actual script. Not sure if that work or not and also has the same downfall as the above but may be my only choice. Was hoping someone else may have an another idea.

Thanks for your help!

you could try converting your ps1 to an exe then you would only have one script to maintain

Yeah, thats a good idea. I wrote it in Powershell Studio and can create the exe from there but saved it as a PS1 to make it easier in the GPO. Now I wonder if I would have the same problem if it was an exe. Thanks, I will have to try that out.

Let me know how you get on. I think it should work as when launching a ps script it is waiting for a return (unless you run it as-job). Launching an exe it should not be waiting for a return same as launching a .bat file(