1. Lệnh Ping : Cú pháp: Code: ping ip/host [/t][/a][/l][/n]



tải về 1.67 Mb.
Chế độ xem pdf
trang73/92
Chuyển đổi dữ liệu18.05.2022
Kích1.67 Mb.
#52014
1   ...   69   70   71   72   73   74   75   76   ...   92
Cac lenh co ban trong DOS

 
Examples
REG QUERY HKCU\Console\ 
REG QUERY HKCU\Console /v ScreenBufferSize 
Find the location of the 
Start Menu
 folder

REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User 
Shell Folders" /v "Start Menu" 
REG ADD HKCU\Software\SS64 /v Sample /d "some test data" 
REG QUERY HKCU\Software\SS64 /v Sample 
REG ADD HKLM\Software\DiLithium /v WarpSpeed /t REG_BINARY /d ffffffff 
REG QUERY HKLM\Software\DiLithium /v WarpSpeed 
Save a directory/registry path that ends with a backslash: 
Set _reg=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App 
Paths\SS64.EXE\ 
Set _prog=C:\Program Files\SS64 App\ 
REG ADD "%_reg%\" /f /v "SS64.EXE" /t REG_SZ /d "%_prog%\"
Save a REG_Expand_SZ value of %systemroot% 
REG ADD HKLM\Software\SS64 /v Path /t REG_EXPAND_SZ /d ^%systemroot^
REG COPY \\Wks580\HKCU\Software\SS64 HKCU\Software\SS64 
REG COPY HKCU\Software\SS64 HKCU\Software\SS64Copy 
REG EXPORT HKCU\Software\SS64 C:\MyReg.REG 
REG IMPORT C:\MyReg.REG 
REG SAVE HKCU\Software\SS64 C:\MyRegHive.hiv 
REG RESTORE \\Wks580\HKCU\Software\SS64 C:\MyRegHive.hiv 
Run a script at first logon (Run Once) to do this we edit the Default User profile by temporarily 
loading it as ZZZ: 
REG LOAD HKU\ZZZ "C:\Documents and Settings\Default User\NTUSER.DAT" 
REG ADD HKU\ZZZ\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /v 
newUserProfile /t REG_EXPAND_SZ /d "D:\setup.cmd" /f 


REG UNLOAD HKU\ZZZ 
More examples are available via: REG QUERY /? REG ADD /? etc 
"The way to a mans heart is through his stomach" - Fanny Fern (writer)
REGEDIT
 
Import, export or delete registry settings from a text (.REG) file 
Syntax 
Export the Registry (all HKLM plus current user) 
REGEDIT /E pathname 
Export part of the Registry 
REGEDIT /E pathname "RegPath" 
Import a reg script 
REGEDIT pathname 
Silent import 
REGEDIT /S pathname 
Start the regedit GUI 
REGEDIT
Open multiple copies of GUI (XP and 2003 only) 
REGEDIT -m 
Key 
/E : Export
/S : Silent Import 
Add keys and values to the registry: 
Create a text file like this: 
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SomeKey] 
"SomeStringValue"="Hello" 
Note the registry file should contain a blank line at the bottom of the file. 
When double clicking this .reg file the key and value will be added. Alternatively run REGEDIT 
MYKEY.REG from the command line. 
Delete keys and values from the registry: 
Create a reg file like this, notice the hyphen inside the first bracket 
Windows Registry Editor Version 5.00
[-HKEY_CURRENT_USER\SomeKey]
When double clicking this .reg file the key "SomeKey" will be deleted along with all string, binary 
or Dword values in that key. 
If you want to just delete values, leaving the key in place, set the value you want to delete = to a 
hyphen 
e.g. 
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SomeKey] 


"SomeStringValue"=- 
Again double clicking this .reg file will delete the values specified, or you can use 
REGEDIT /s 
MyDeleteScript.REG
Compare the Registry of two machines 
Windiff
 is your friend, this simple GUI utility from the 
resource kit
 will list all the differences. 
Add Comments 
Within a registry file, comments can be preceded by "; "
e.g. 

; Turn the NUMLOCK on at login 

[HKEY_CURRENT_USER\Control Panel\Keyboard] 
"InitialKeyboardIndicators"="2"
Batch files will ignore any semicolons before a command, so this can be used to create a 
self-
contained registry script

Under Windows NT 4 all registry scripts start with: 
REGEDIT4
(This version string will also work 
in XP and later versions of Windows.) 
“I never make stupid mistakes. Only very, very clever ones” - 
John Peel
 
REGSVR32
 
Register or unregister a DLL. 
Syntax 
REGSVR32 [/U] [/S] [/N] /I:[CommandLineDLL_Name 
Key 
/u Unregister Server. 
/s Silent, do not display dialogue boxes. 
/i Call DllInstall to register the DLL. 
(when used with /u, it calls dll uninstall.) 
/n Do not call DllRegisterServer, you must use this option 
with /i.
CommandLine An optional command line for DllInstall 
/c Console output (old versions only). 

tải về 1.67 Mb.

Chia sẻ với bạn bè của bạn:
1   ...   69   70   71   72   73   74   75   76   ...   92




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương