Experienced Elementalist
- Joined
- Mar 23, 2009
- Messages
- 239
- Reaction score
- 17
This handy little application automatically checks your process list for command prompt, if it isn't running it runs the application at this directory:
(That's where your start.bat has to be located for this to work)
But, remember once this starts it uses a very bad goto statement so it will freeze, and it also uses Thread.Sleep so that's another reason why it will freeze, it is still working, you just need to minimize it. ; )
Source Snippet:
Please post suggestions for future releases in this thread. Thanks.
Code:
C:\rserv\source\start.bat
(That's where your start.bat has to be located for this to work)
But, remember once this starts it uses a very bad goto statement so it will freeze, and it also uses Thread.Sleep so that's another reason why it will freeze, it is still working, you just need to minimize it. ; )
Source Snippet:
Code:
start:
Process[] pname = Process.GetProcessesByName("cmd");
if (pname.Length == 1)
System.Threading.Thread.Sleep(5000);
else
Process.Start(@"C:\rserv\source\start.bat");
goto start;
Please post suggestions for future releases in this thread. Thanks.