中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-12 17:37
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS批处理 & 脚本技术(批处理室) » Investigation and Popularization of System Commands
Printable Version  1,813 / 13
Floor1 PPdos Posted 2008-06-23 05:06
高级用户 Posts 268 Credits 783
Let's give everyone a question and also make a suggestion:

Run the following command:


See if there are any internal or external commands you don't understand...

Then choose one that you don't understand yourself, try to figure it out, and then post the usage and give an example

If everyone thinks the knowledge is complete, please give it a try
Floor2 PPdos Posted 2008-06-23 05:33
高级用户 Posts 268 Credits 783
First, let's talk about one of the commands I don't understand (though there are many ><#!).

RSH command

Short for remote shell. Simply understood as establishing a pipeline with the remote host, sending the commands with carriage returns from the local machine to the remote host, and then echoing the response from the remote host back to the local host.


Example:
Execute the dir command on the remote host 192.168.0.1 as user Coucou

rsh 192.168.0.1 -l Coucou dir
> Connection timed out for 192.168.0.1

(I don't have a remote host here, just make do everyone)

If using redirection ">>", you need to add quotes, otherwise it will execute on your own machine

[ Last edited by PPdos on 2008-6-23 at 01:09 AM ]
Floor3 pusofalse Posted 2008-06-23 07:19
银牌会员 Posts 646 Credits 1,604
I want to know how many commands there are in total... I'm afraid I don't even know a third of them...
Floor4 PPdos Posted 2008-06-23 08:13
高级用户 Posts 268 Credits 783
There are more than 300 items in my XP Home Edition SP3 system.

Post another command: This command fascinates many people^^
Floor5 lxmxn Posted 2008-06-23 22:16
版主 Posts 4,938 Credits 11,386
whoami -- This tool can be used to obtain the username and group information of the current user (access token) on the local system, as well as the corresponding security identifier (SID), privileges, and logon ID. For example, who is the currently logged - in user? If no switch is specified, the tool displays the username in NTLM format (domain\username).


Windows Server 2003
C:\>whoami /user

User information
----------------

Username SID
==================== ============================================
jinjie - 520\jinjie027 S - 1 - 5 - 21 - 2901898759 - 1882768009 - 928121960 - 500
Floor6 PPdos Posted 2008-06-24 23:50
高级用户 Posts 268 Credits 783


Collect hardware and software information about the system and information about network connections

The GUI interface is

This command is really powerful. I used it occasionally before but didn't study it carefully. Today, I was fortunate to see it again, so I'll demonstrate it for everyone:

If you don't understand, please query the help with

The following are examples of individual operations:

netsh firewall>show state

Firewall state:
-------------------------------------------------------------------
Configuration file = Standard
Operation mode = Disabled
Exception mode = Enabled
Multicast/broadcast response mode = Enabled
Notification mode = Enabled
Group policy version = None
Remote management mode = Disabled

Ports currently open on all network interfaces:
Port Protocol Version Program
-------------------------------------------------------------------
9 UDP IPv4 C:\Program Files\Windows Live\Messenger\msnmsgr.exe
33191 UDP IPv4 C:\Program Files\Windows Live\Messenger\msnmsgr.exe
15882 UDP IPv4 C:\Program Files\Windows Live\Messenger\msnmsgr.exe
1763 UDP IPv4 C:\Program Files\Windows Live\Messenger\msnmsgr.exe
59154 UDP IPv4 C:\Program Files\Windows Live\Messenger\msnmsgr.exe
24358 UDP IPv4 (null)
24358 TCP IPv4 (null)
1932 UDP IPv4 C:\Program Files\Windows Live\Messenger\msnmsgr.exe
1986 UDP IPv4 C:\Program Files\Windows Live\Messenger\msnmsgr.exe
56306 UDP IPv4 C:\Program Files\Windows Live\Messenger\msnmsgr.exe




C:\Documents and Settings\me>netsh diag connect 58.215.64.130 80
The following command was not found: diag connect 58.215.64.130 80.

C:\Documents and Settings\me>netsh diag connect iphost 58.215.64.130 80

IPHost (58.215.64.130)
IPHost = 58.215.64.130
Port = 80
The server appears to be running on port


In addition to connecting to a specified IP and specified port, it can also be a proxy server, mail server, etc.

C:\Documents and Settings\me>netsh diag connect

The following commands are valid:

Commands in this context:
connect ieproxy - Connect to the proxy of Internet Explorer
connect iphost - Connect to the user-specified IP host.
connect mail - Connect to the mail server.
connect news - Connect to the news server.


Show the commands at once
netsh diag>show

The following commands are valid:

Commands inherited from the netsh context:
show alias - List all defined aliases.
show helper - Please list all top-level helpers.
show mode - Display the current mode.

Commands in this context:
show adapter - Display all adapters.
show all - Display all categories.
show client - Display all network clients.
show computer - Display computer information.
show dhcp - Display the DHCP server for each adapter.
show dns - Display the DNS server for each adapter.
show gateway - Display the default gateway server for each adapter.
show ieproxy - Display the server name and port number of Internet Explorer.
show ip - Display the IP address of each adapter.
show mail - Display the mail server name and port number.
show modem - Display all modems.
show news - Display the news server name and port number.
show os - Display operating system information.
show test - Display all categories and execute all tests
show version - Display Windows and WMI versions.
show wins - Display the preferred and auxiliary WINS servers for each adapter.


It's fun too. Those who like it can post and top!

[ Last edited by PPdos on 2008-6-24 at 04:57 PM ]
Floor7 523066680 Posted 2009-01-02 14:42
银牌会员 Posts 1,133 Credits 2,362
netsh can also set up the firewall. Good stuff (it's available on my computer, but not on the Internet café's computers).
Want to learn the makecab packaging tool. After looking at the Lao Maotao's work, many of those parameters are not understood.
Hope for an expert's guidance
Floor8 HAT Posted 2009-01-02 19:07
版主 Posts 5,017 Credits 9,023
MakeCAB is a file created by Microsoft for making CAB files. For detailed MakeCAB introductions, please refer to Microsoft MSDN. The command usage provided by the system is as follows:

Microsoft (R) Cabinet Maker - Version (32) 1.00.0601 (03/18/97)
Copyright (c) Microsoft Corp 1993-1997. All rights reserved.

MAKECAB ] source
MAKECAB ] /F directive_file

source File to compress.
destination File name to give compressed file. If omitted, the
last character of the source file name is replaced
with an underscore (_) and used as the destination.
/F directives A file with MakeCAB directives (may be repeated).
/D var=value Defines variable with specified value.
/L dir Location to place destination (default is current directory).
/V Verbosity level (1..3).

If there are multiple files in a directory, then you need to write a file list file to tell MakeCAB how many files need to be packaged.
A simple list.txt file is written, which contains only 2 lines. One is libactivex.inf, and the other is libactivex.dll
Then execute:

makecab /F list.txt /D compressiontype=lzx /D compressionmemory=21 /V

The system will display the compression process and the compression result, as follows:

Microsoft (R) Cabinet Maker - Version 5.1.2600.2180
Copyright (c) Microsoft Corporation. All rights reserved..

287,395 bytes in 2 files
Total files: 2
Bytes before: 287,395
Bytes after: 162,170
After/Before: 56.43% compression
Time: 0.74 seconds ( 0 hr 0 min 0.74 sec)
Throughput: 378.76 Kb/second

After compression, a directory will be generated under the directory. Rename the files in the directory to libactivex.cab (it can be the file name you need) and it's OK.

Then it can be placed in the directory of the WEB server, and IE will prompt to download when opened.

Attachment: The generation method of INF will be introduced later.

In fact, there are 2 other ways to generate CAB files. One is to use Visual Studio, and the other is to use a special packaging tool. You can Google it.

Detailed explanations and tips for using makecab:

The simplest usage:
makecab full name of the file such as makecab wmd.dll

Specify compression type and the size of memory used:
makecab /d compressiontype=lzx /d compressionmemory=21 wmd.dll has a high compression ratio

Batch compression method:
for %v in (*.*) do makecab %v

Before, I studied for a long time and didn't know how to use one command to compress all files in a directory into a CAB package. Now I finally know that the way to compress into one CAB package is:
makecab /f list.txt /d compressiontype=mszip /d compressionmemory=21 /d maxdisksize=1024000000 /d diskdirectorytemplate=dd* /d cabinetnametemplate=dd*.cab

Here's one with a high compression ratio:
makecab /f list.txt /d compressiontype=lzx /d compressionmemory=21 /d maxdisksize=1024000000 /d diskdirectorytemplate=dd* /d cabinetnametemplate=dd*.cab

The list.txt here is the list of files. If it's a relative path, then it should be placed in the folder to be compressed. If it's an absolute path, it can be placed anywhere!
Floor9 netbenton Posted 2009-01-04 00:18
银牌会员 Posts 752 Credits 1,916 From 广西
Floor10 523066680 Posted 2009-01-10 14:06
银牌会员 Posts 1,133 Credits 2,362
Please allow me to put such a long thing....

bootcfg Description:
This command-line tool can be used to configure, query, change or delete startup project settings in the BOOT.INI file.

charmap Character map

chkntfs Displays or modifies disk checks at startup.

cleanmgr Disk cleanup tool (under Windows)

cliconfg SQL SERVER Client Network Utility (under Windows)

clipbrd Clipboard Viewer (under Windows)

convert Convert disk to NTFS format (without deleting data)

ddeshare Share (under Windows)

defrag Defragmenter

diantz Equivalent to the makecab command, seems to be a cab packing tool

diskpart Many disk operations, don't understand

dosx Enter command state


DRIVERQUERY ]]]

Description:
Allows administrators to enumerate and display lists of installed device drivers and properties of drivers.

drwatson System Doctor (under Windows)

drwtsn32 Related to System Doctor (under Windows)

dxdiag DirectX Diagnostic Tool (under Windows)

esentutl English, completely don't understand. Seems related to databases

eventvwr Event Viewer (under Windows)

exe2bin Seems to convert EXE to Bin, never succeeded in playing around...

expand Unzip cab files
It seems (just saying seems) -f parameter seems to be used to specify unzipping one of the files

Passing by the fc command, everyone uses this to check answers when doing math exercises is the best

finger
Displays information about a user on a specified system running the
Finger service. Output varies based on the remote system.

forcedos Startup program.
Can pass parameters to the program.

Depressed freecell is FreeCell

fsquirt (under Windows) Bluetooth File Transfer Wizard, I see tooth is so familiar, it turns out to be tooth, still Bluetooth.

fsutil Good stuff, after...

getmac (don't understand)
Description:
This command-line tool enables administrators to display the
MAC addresses of one or more network cards on the system.

getresult
Description:
This command-line tool displays the result set of policies (RSoP) for the target user and computer. (Seems to be related information)

gpupdate
Microsoft(R) Windows(R) Operating System Group Policy Refresh Utility v5.1
(C) Microsoft Corporation. All rights reserved.
Description: Refreshes group policy settings.

hostname Computer name

iexpress (under Windows) File bundling thing.... Seems to be packaged in an EXE file, like an installer during setup
The first time I saw it was in a certain tutorial--Windows built-in Trojan bundling tool....

ipxroute NWLink Source Routing Control Program version 2.00.

LODCTR (don't understand) Updates performance monitor counter names and descriptions for extensible counters

Logman Manages the "Performance Logs and Alerts" service to create and manage event trace session logs and performance logs.
(Although I don't know how to play, but very "advanced" I use more combined to list, the result is one character per line... and there are beeps)

logoff Don't know until you try... try

magnify (under Windows) Magnifier

makecab Compress + package the same as the diantz mentioned above

Mem (needs to be used in command)
Displays information about allocated memory regions, available memory regions, and programs loaded into the memory in the MS-DOS subsystem. Typing mem without parameters displays the status of used and available memory in the MS-DOS subsystem.

Parameters
/program
Displays the status of programs being loaded into memory.
/debug
Displays the status of currently loaded programs and internal drivers, as well as other program information.
/classify
Displays the status of programs loaded into conventional memory and Upper Memory Area (UMA).
/?


mmc Path\filename.msc

Parameters
Path\filename.msc
Starts MMC and opens the saved console. The full path and filename of the saved console file need to be specified. If no console file is specified, MMC will open a new console.
/a
Opens the saved console in author mode. Used to make changes to the saved console.
/64
Opens the 64-bit version of MMC (MMC64). Only used when running Windows XP 64-Bit Edition.
/32
Opens the 32-bit version of MMC (MMC32). When running Windows XP 64-Bit Edition, you can use this command-line option to open MMC to run 32-bit snap-ins.



mountvol (Good stuff....) Creates, deletes, or lists volume mount points.

mplay32 Windows built-in music player, File - Open - discovers Windows sound audio files, such as shutdown
In the windows\media directory

mkbkup Seems to be for backup and restore, don't know how to use.

mqsvc Don't know what it is The list of that string is very unique

mrinfo -n Displays IP addresses in numeric format
-i address Local interface address to send the query
-t seconds Timeout for IGMP queries (in seconds) (default is 3 seconds)
-r retries Additional number of SNMP queries to send (default is 0)

msg (System dialog) Sends messages to users

mshearts Online Hearts

msiexec Installation options

narrator Windows Narrator

nslookup Displays information that can be used to diagnose the Domain Name System (DNS) infrastructure. Before using this tool, you should be familiar with how DNS works. The Nslookup command-line tool can only be used if the TCP/IP protocol is installed.

ntbackup (under Windows) Backup tool

ntsd All English, it is said to be a tool other than taskkill to force close processes, I don't know.

openfiles Description:
Allows administrators to list or interrupt open
files and folders on the system.

osk Different from the screen keyboard I have seen before Very beautiful (don't know if it is related to the system version)

packager (under Windows) Object Packager seems to be able to change icons

pentnt English, completely don't know

proxycfg -? : View help information

proxycfg : View current WinHTTP proxy settings

qprocess Another way to list processes

qwinsta Session...

racmgr32 (under Windows) Remote Automation Connection Program

replace Replace files I forgot there was this command

rtcshare (under Windows) Shared session

runas Allows users to run specified tools and programs with other permissions instead of the permissions provided by the user's current login.

sigverif (under Windows) File Signature Verification

syncapp (Create a My Briefcase on the desktop)

sysedit (under Windows) System Configuration Editor

tsdiscon Goes to the logoff screen but doesn't log off...

tsshutdn Shuts down, feels good

verifier (under Windows) Completely don't understand

winchat (under Windows) Chat
Floor11 HAT Posted 2009-01-10 15:57
版主 Posts 5,017 Credits 9,023
If some application examples and switch explanations can be provided, it will be even better.
Floor12 523066680 Posted 2009-01-14 09:24
银牌会员 Posts 1,133 Credits 2,362
I broke my promise and came online again...

I don't know myself, I just tried one by one and read the instructions.

By the way, there is a "I Love Batch Processing - Special Tutorial" that extracts help tutorials online.

I have a cloud disk hidden at 523066680.ys168.com, in the last folder
Floor13 523066680 Posted 2009-01-29 21:38
银牌会员 Posts 1,133 Credits 2,362
It seems that chatting about commands one by one is more interesting.

I used mqsvc to list a table, and I have no idea what that thing is. Which expert is willing to analyze it for me?

Thanks in advance.
Floor14 523066680 Posted 2009-10-22 15:32
银牌会员 Posts 1,133 Credits 2,362
The w32tm command is not bad, everyone can study it~
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023