Batch Processing hides its own window, boring

Source: Internet
Author: User

CopyCode The Code is as follows: @ echo off
: Code by LZ-myst QQ: 8450919 blog: http://hi.baidu.com/lzmyst http://www.clxp.net.cn
If "% 1" NEQ "1 "(
> "% Temp % \ TMP. vbs" Echo set wshshell = wscript. Createobject ^ (^ "wscript. Shell ^" ^)
> "% Temp % \ TMP. vbs "Echo wshshell. run CHR ^ (34 ^) ^ & % 0 ^ & CHR ^ (34 ^) ^ & ^ "1 ^", 0
Start/D "% Temp %" tmp. vbs
Exit

)
: From here on, it's your batch processing code. The dos black box will flash and go to the background to run it.
Pause
: You will see a hidden cmd process in the task manager.

How to hide the CMD window when running bat

You can edit a vbs script by hiding the CMD window when running BAT to hide the window for batch processing.Program.Copy codeThe Code is as follows: Set Ws = Createobject ("wscript. Shell ")
WS. Run "CMD/C batch processing program name", vbhide

Copy the above Code to notepad and save it as "runbat. vbs "or other names (the extension must be. vbs), and then click Run the generated script runbat. vbs to hide and run the specified batch processing program.
This vbs script can also be called directly in the bat environment to hide the bat itself.
I would like to summarize some examples and try it out if you are interested!Copy codeThe Code is as follows: Set Ws = Createobject ("wscript. Shell ")
Wscript. Sleep 1200 ws. Run "CMD/C start winrar.exe", vbhide
Wscript. Sleep 2200 ws. Run "CMD/C start msimn.exe", vbhide
Wscript. Sleep 1200 ws. Run "CMD/C start iexplore.exe", vbhide

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.