Hiding output from batch file
Posted 18 February 2002 - 21:58
Posted 19 February 2002 - 13:07
1. Right click on the bacth file on your pc.
2. Select Properties.
3. Look for minimized/symbol appearance on the program tab ...
4. Edit the .pif file to have just the bacth file name and no path information
5. Copy the .pif file to the same directory as the bacth file and run the .pif instead of the .bat.
ps: this may not be working with WinNT ...
(Edited by Perotin at 1:08 pm on Feb. 19, 2002)
Posted 19 February 2002 - 14:36
Posted 21 February 2002 - 22:07
HWND nHwnd; // Put before Begin in your script
// Open the batch file.
if (LaunchApp( "C:\\Test.bat", "" ) < 0 ) then
MessageBox ("Unable to launch C:\\Test.bat.", SEVERE);
abort;
endif;
// Wait five seconds so we can view the window before
// it's minimized.
Delay( 5 );
// Retrieve the handle of the window. The first parameter
// is the window class. A null string in the second parameter
// specifies the topmost window of that class.
nHwnd = FindWindow( "ConsoleWindowClass", "" );
if ( nHwnd = NULL ) then
MessageBox( "Unable to find the window.", SEVERE );
else
// Send system command to minimize the window.
SendMessage( nHwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0 );
// Keep it minimized for five seconds.
Delay( 5 );
// Send system command to maximize the window.
SendMessage( nHwnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0 );
endif;