Dot Net Fluke: Getting by on C# for iSeries RPG Developers

Useful tutorials on C# and .NET for RPG iSeries AS/400 developers. Brought to you from the folks at AranRock Consulting

9/12/08

How to run your .net batch programs without showing a dos screen

If you are writing a 'batch' .NET program, that is a program that does not have user interaction- a Console program you may not want the console (the DOS screen) to pop up at all - especially if it is running frequently as a scheduled task in windows.
There are a couple of ways to prevent the DOS screen flashing up every time your program runs. Here's a simple way:

  1. Create a batch file (Myapp.bat for example) to run your app.
  2. Create a shortcut (.lnk) to Myapp.bat
  3. Right click on the shortcut and select Properties
  4. Change the drop down for Run from Normal to Minimized
  5. Now run your shortcut. The dos screen should not appear and the program should appear on your taskbar as it runs.
  6. If it doesn't work for some reason try entering the Target name manually rather than using what was entered when you created it. Sounds nuts but people have found this as a solution when the shortcut still shows the dos promptimage

Labels: , , ,

1 Comments:

At June 23, 2009 at 2:06 PM , Anonymous Michael Twone said...

There is another approach that you have not considered - using the properties configuration.

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home