How does the msdos window of bat batch files run in the background?

Source: Internet
Author: User
For batch files, the command line display can be hidden during execution. Can this function be directly run in the background without a window popped up?
 
1. Use vbsCode.
Dim objshellset objshell = wscript. createobject ("wscript. shell ") ireturn = objshell. run ("cmd.exe/C 1.bat", 0, true) ireturn = objshell. run ("cmd.exe/C 2.bat", 0, true)
Save as 1. vbs Note: This method is to run 2.batafter 1. BAT and so on. 2. bat is finished. If not, delete 2.bat.
 
2. Create a notepad under the same directory of Batch Processing
Enter:
Set Ws = wscript. Createobject ("wscript. Shell") WS. Run "win. BAT/start", 0
(Here, win. bat is the batch name, and you can change it yourself) and save this notepad as a file with the suffix. VBE. You only need to run this VBE file to achieve your goal!

From: http://gb.qin.blog.163.com/blog/static/10965522720104885353776/

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.