troubleshooting Question

Infinite AutoIT Loop, Exit Compiled EXE to get Command Prompt Back

Avatar of rmessing171
rmessing171Flag for United States of America asked on
Microsoft Server OSProgrammingVB Script
7 Comments1 Solution1942 ViewsLast Modified:
I am deploying a compiled AutoIT exe script via SCCM, however I have an infinite LOOP incorporated at the end of the script to display a message in the System Tray.  Via a Command Prompt, I have noticed that the EXE is waiting for the loop to complete before returning the Command Prompt back.  Is there a way to have the loop run infinitely and have the EXE return (an Exit Code of 0) and the command prompt with out breaking the loop?

The script with the infinite loop is below:

TraySetToolTip ("Please restart your system")
Break(0) ;Disable break

While 1 = 1
   TrayTip("IT", "Critical updates have been installed on your system. Please save your work and restart your system as soon as possible.", 10, 1)
   Sleep (900000)

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros