Can a GPO Startup Script starts a background process and exit immediately

active-directorygroup-policystartup-scripts

I have Googled, and not yet found an answer.

Scenario: One of my GPOs have a Startup Script that takes a long time to finish. For some reasons, we have to run the scripts synchronously. Naturally, this causes slow startup time (sometimes as long as 15 minutes!) before the Logon screen appears.

After profiling and analyzing the perpetrator script, I conclusively determined that the step where it's taking a long time to finish will not affect the result of the succesive GPOs. In other words, that particular step (and all steps afterwards) can run in the background.

My Question: Is it possible for the Startup Script to just 'trigger' another script/program that will run to completion even when the Startup Script exits? That is, the "child processes" of the Startup Script continues to live even when the Startup Script's process ends?

Additional Info: The Domain Controllers are 2008 and 2008 R2's. The workstations are Windows XP.

Best Answer

Sorry for not answering (my own question) sooner.

So, this is how I finally settled my problem.

On Startup, the Startup Script creates an at job. Since Startup Scripts run as SYSTEM, the at job will similarly run under SYSTEM privileges. The at job is configured to run 2 minutes after creation.

The command in the at job is the actual workload script. which fires up whatever payload it should be doing. Since it starts as a scheduled job, it doesn't care who's logged in at the time.

Voila! Mission accomplished :-)