Using Process.Start in chain hangs my computer
<p>I have strange trouble, I created console app App1, only purpose of this app is to get argument (val) check if this value is greater than zero if yes then run the same app (App1) with val-- in argument and turn off. </p>

<p>I run this app from scheduled task, I run it every one minute. The problem is that when I run this application with 1000 as argument it hangs my computer after two or three minutes (blue screen). For argument like 10 everything works fine.</p>

<p>I need this app to test some problem with memory management on different machine.</p>

<p>I runned following code:</p>

<pre><code>static void Main( string[] args )
{
 if ( args.Length &gt; 0 )
 {
  int val = 0;
  try
  {
   Int32.TryParse( args[ 0 ], out val );
  }
  catch ( Exception ex )
  { }
  if ( val &gt; 0 )
  {
   val--;
   ProcessStartInfo psi = new ProcessStartInfo(System.Windows.Forms.Application.ExecutablePath, val.ToString() );
   psi.CreateNoWindow = true;
   psi.WindowStyle = ProcessWindowStyle.Hidden;
   Process.Start( psi );
  }
  System.Console.WriteLine( args[ 0 ] );
 }
 System.Console.WriteLine( "App" );
}
</code></pre>
