Mining hidden CMD window
shell
=
Wscript.createobject(" wscript.shell")< br />a
=
shell.run
(" Path: 92; File. Bat & quot;, 0)
--- the code in the dotted line and save it as *. VBS file -------- manually modify the path of bat file and file name!
if "% 1" = " quot; h" goto start
mshta vbscript:createobject (" wscript.shell"). run("" quot; quot; nx0" quot; h" 0)(window.close)&exit
:start
203204; CMD
there is a program hidden
Solution:
1. First of all, the "Win + R" key combination opens the "run" window. Enter "OSK" to open the screen keyboard
2) using wincmd, write a batch process and call wincmd's exec to start your bat
specific wincmd usage: exec! a.bat
@echooffif"% 1"==& quot; h" gotobeginstartmsht avbscript:createobject (" wscript.shell"). run("& quot;& quot;%~ nx0"& quot; h", 0)(window.close)&& amp; exit:begin :: the following are normal batch commands, which can not contain pauseset / P and other interactive commands
if you double-click a batch, it is equivalent to the parameter is empty, and some applications need parameters, such as inputting shutdowm-s-t0 in the CMD window, where - s-t0 is the parameter. Shutdown is% 0, - s is% 1, - t is% 2, and so on. Let's skip the first line and look at the second line, which means to create a VBS program with mshta, and the content is: create object (& quot; wscript.shell"). Run (...). If the running batch is named a.bat, under C: , then% 0 represents C:: a.bat, and% ~ nx0 represents a.bat. H is the most important parameter% 1, and 0 indicates hidden operation. Because you double-click to run, the first batch% 1 is empty. If it doesn't hold, run the next sentence instead. Then open yourself again and pass the parameter h. at this time, if is established, jump to begin to run. These two lines are classic and can make batch processing run windowless
if "% 1" == & quot; yes" goto begin
mshta vbscript:createobject (" wscript.shell"). run("%~ nx0 yes", 0) (window. Close) & & exit
: begin
:: start to run batch command from here, there will be no window prompt
:: working principle: use VBS background running script wscript.shell to run batch