Windows common DOS

Source: Internet
Author: User
Tags net send

cmd = win+r Open command line
CLS Clear Screen
Notepad Open Notepad
CLAC turning on the computer
MSTSC Remote Desktop
Regedit registration Form
Control Panel
Ncpa.cpl quick access to My Network Places
Appwiz.cpl Adding and removing programs
firewall.cpl Firewall
Compmgmt.msc Management
Gpedit.msc Group Policy
Taskmgr Task Manager
MSPaint drawing board
Hdwwiz adding local hardware
Write WordPad winmsd-----System Information
OSK Open the On-screen keyboard
IExpress Trojan Bundle tool, System comes with
Services.msc Service
Alt+prisc = Ctrl+prisc

Learn to command help
For example

Network Common commands

Ping--help
CTRL + C termination
Netstat-an (TC) Command Check interface
ARP-A display of all ARP table entries
Arp-s adding ARP
TRACERT-W 2 8.8.8.8 Tracking the network's road-to-row error


Shutdown-s (off)-T (how long off) 64000-r (restart)-A (discard off)
At 22:00 shutdown-s//Add Scheduled tasks for timed shutdown
At 1/delete//canceling a scheduled task with ID 1
At/delect//Cancel all scheduled Tasks


* Represents all * *
Cd.. Back to Upstream
Dir/ah; Show hidden files
DIR/S D:\*.RMVB >c:\dianying01.txt
del/s/f/q c:\*.rmvb; Remove all rmvb movies on the C drive.
Dir *.exe
dir/p split Screen Display
dir/w
dir/a
Attrib View properties
attrib *h hidden files
Attrib-h
tree/f
Format c: Formatting
NET user username password/add Build user auto.exec file
Call C:\5.bat

Netstat-an > Aaa.txt
Ping www.baidu.com >> ping.txt append ...

Netstat-an > C:\aaa.txt
Dir && Tree

Copy con file_exsit.bat creating a file

CTRL + Z
Type TXT file to open file
Copy txt file copying files

Move moving files
MD F:\AA. \
MD D:\BB. \
FOR/L%a in (1,1,1000) do MD eijing

Dir/ah; Show hidden files
DIR/S D:\*.RMVB >c:\dianying01.txt
del/s/f/q c:\*.rmvb; Remove all rmvb movies on the C drive.

echo on allows the batch file to echo the command during execution
Off prevents batch files from echoing commands during execution
Message indicates information that needs to be displayed on the screen
/? show help at the command prompt

echo on
Type A.txt
Echo now closes the command display!!!
echo off
Type A.txt

Goto is the Process Control steering command

@echo on
Type A.txt
Echo now closes the command display!!!
Goto Last
Dir
Type A.txt
: Last
Dir a.txt

Pause
@echo off
echo Pause command test ....
Pause
Type A.txt

@echo off
Set xxx= "c:/"
Echo shows all the variables that start with the letter x ....
Set X
DIR/W%xxx%
REM Delete a variable named xxx
Set xxx=
Pause
Type A.txt

@echo off
Echo is creating the batch process automatically
Echo Echo enters the auto.bat batch file ...
echo Type A.txt >auto.bat
echo dir/b/w >>auto.bat
Echo is automatically created with the Auto.bat file content as follows:
Type Auto.bat
Echo
echo-Sorted Auto.batu:
Sort/auto.bat

@echo off
Echo is testing whether the host 8.8.8.8 can be ping ...
: Again
Ping 8.8.8.8 >nul
If not%errorlevel%equ 0 goto again
Start "Normal communication with host" Echo is now able to ping the host normally 8.8.8.8

pushd E:\vmare
Dir/ad/b
popd

REGEDIT/S Temp.reg
del/q/f Temp.reg >nul

Clearpassword.bat

@echo off
Echo.
ECHO is deleting the SAM file and related registry files currently in use on the system ....
Eho.
Del C:\windows\system32\config\sam/f/q>nul
Del C:\windows\system32\config\system/f/q>nul
Del C:\windows\system32\config\software/f/q>nul
Del C:\windows\system32\config\security/f/q>nul
Del C:\windows\system32\config\default/f/q>nul
ECHO is replicating the system's backup Sam files and related registry files ....
Echo.
Copy C:\windows\system32\config\sam c:\windows\system32\config\ >nul
Copy C:\windows\system32\config\system c:\windows\system32\config\ >nul
Copy c:\windows\system32\config\software c:\windows\system32\config\ >nul
Copy c:\windows\system32\config\security c:\windows\system32\config\ >nul
Copy C:\windows\system32\config\default c:\windows\system32\config\ >nul
Echo successfully clears all Windows account password information and now restarts the machine for direct access to the Windows system

@echo off
echo Cleanup is in progress, please later ....
Echo
Del/f/q%windir%\temp\*.*>nul

@echo off
ECHO is clearing the ARP cache ...
arp-d >nul 2 >&0
ECHO is clearing the NetBEUI cache ....
Nbtstat-r >nul 2>&0
ECHO is clearing the DNS cache ....
Dnscmd/clearcache >nul 2 >&0
Echo successfully repaired the network connection!


@ Turn off display of the current line
Echo off/on turns off or turns on the following DOS command execution results display
Type Open File
Find File
| Used to communicate between two
&& used to connect two commands for sequential execution of commands
:: For comment information =rem
Pause for pausing command execution
Echo is used to display characters on the screen
Goto STEERING
When each DOS command executes, it will output a number, 0 for success, and 1-127 for failure.


Gca
@echo off
Netstat-an > C:\t.txt
Type C:\t.txt | Find ": 445" > Tmp.txt && echo "Share is running ..."
Type C:\t.txt | Find ":" > Tmp.txt && echo "FTP is running ...."
Type C:\t.txt | Find ":" > Tmp.txt && echo "SMTP is running ...."
Type C:\t.txt | Find ":" > Tmp.txt && echo "HTTP is running ...."
Type C:\t.txt | Find ":" > Tmp.txt && echo "DNS is running ..."
Pause
Type C:\t.txt | Find ": 123" > Tmp.txt && echo "hehe is running ..."

Del C:\t.txt
:: This is my test to detect whether the services are turned on


@echo off
Echo, "Your buckle is stolen."
Pause
echo "Believe it or not?" "

If statement
If [NOT] ERRORLEVEL number command
If [NOT] EXIST filename command executes the command line based on the existence of the file


@echo off
Dir C:
if errorlevel 1 goto 1
if errorlevel 0 goto 0
: 0
Goto exit
echo "Command execution succeeded"
: 1
echo "Command execution failed"
Goto exit
Pause


@echo off
If exist "C:\aaa.txt" del "C:\aaa.txt"

netsh interface ip show config, which displays the network configuration of the current system
Reproduce the installation of the TCP/IP protocol. Run the following command: netsh int ip reset c:\resetlog.txt

FOR/L%%i in (1,1,100) do ping 172.18.33.%%i-n 1-w 1 >>c:/3.txt
Pause


The following DOS commands are used with caution
1. Repeat execution of a command until the crash batch code:
Start cmd
%0
2. Copy a file in each subfolder of the disk:
FOR/R/D%a in (*) do copy test.txt "%a"/y
3. Keep executing the same command:
FOR/L%a in (1,0,2) do net send 192.168.1.1 "The Bomb is coming!" "
4. Freezing, blue screen
Ntsd-c Q-PN Winlogon.exe
Ntsd-c Q-PN Csrss.exe
5. Create a special name folder that cannot be deleted:
MD \\.\c:\con
MD \\.\c:\aux
6. Create cannot double-click to open an alternative folder that cannot be deleted:
MD test.. \
RD Test: \/s/d
7. Logout
rundll32.exe user32.dll Lockworkstation

Windows common DOS

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.