Wednesday, January 12, 2011

hide command window while running batch files

Guys this time it is completely out of Android. One from my organization asked me on "how to hide command windows while running batch files".So here i want to share the same answer to you all.
It is quite common question to all who runs batch jobs . Always those black ugly screens spreads across all over the screen. So to get rid of that, follow these tips
  1. Minimize:
    • create a short cut to the batch file
    • right click on the short cut and select properties
    • click on run dropdown and select minimized
    • click ok and double click the short cut. That's it from now on , when you run the shortcut it runs the command window in minimized state.
  2. Invisible:
    •  Create one *.vbs file and paste the below given code and save it . Eg: invisible.vbs
    • "CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False"
    • create a short cut with the location as C:\Windows\System32\wscript.exe "fullpath of .vbs file" "full path of .bat file"
    • save it and run it. It will never shows those black screens.

No comments:

Post a Comment