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



tải về 1.67 Mb.
Chế độ xem pdf
trang82/92
Chuyển đổi dữ liệu18.05.2022
Kích1.67 Mb.
#52014
1   ...   78   79   80   81   82   83   84   85   ...   92
Cac lenh co ban trong DOS

# I got my mind set on you
# I got my mind set on you... - George Harrison 
Share.vbs
 (
Resource Kit

List or edit a file share or print share (on any computer) 
Although missing from recent Resource Kits, this VBS script does still work under recent 
versions of Windows. The preferred method for creating shares is the 
RMTShare
 command, 
which can also grant permissions. 
Syntax: 
 List Shares 
Share.vbs /L [/S <server>] [/U <username>] [/W <password>] [/O 
<outputfile>] 
 
 Create a Share 
Share.vbs /C /N <name> /P <path> [/T <type>] [/V
[/S <server>] [/U <username>] [/W <password>] 
[/O <outputfile>] 
 Delete a Share 
Share.vbs /D /N <name
[/S <server>] [/U <username>] [/W <password>] 
[/O <outputfile>] 
Key: 
/L List 
/C Create 
/D Delete 
/N name Name of the share to be created or deleted. 
/P path Path of the share to be created. 
/v description A description for the share. 
/T type Type of the share to be created. (Disk, Printer, IPC 


or Special) 
/S server A machine name. 
/U username  The current user's name. 
/W password  Password of the current user. 
/O outputfile  Output file name. 
Examples:
List the shares on the machine \\Frodo 
cscript Share.vbs /L /s Frodo 
Create a file share called "scratch" on the local machine: 
cscript Share.vbs /c /n scratch /p "c:\my shared files" /t Disk /v 
"project files"
Delete the share named "scratch" on the machine \\Frodo 
cscript Share.vbs /d /n scratch /s Frodo
 
"The inherent vice of capitalism is the unequal sharing of blessings, the inherent vice of 
Socialism is the equal sharing of miseries" ~ Winston Churchill
SHORTCUT.exe
 (
NT Server Resource Kit

Create a windows shortcut (.LNK file) 
Syntax 
SHORTCUT [options
Key 
Source options 
-t target : The path and file name of the application/document to 
open. 
-a arguments : The arguments passed when the shortcut is used. 
-d directory : The folder to start the application in. 
-i iconfile : The file the icon is in. 
-x index : The index into the icon file. 
options for the shortcut file to be created 
-n name : The path and file name (.LNK) of the shortcut file. 
-c : Change existing shortcut. 
-r : Resolve broken shortcut. 
-f : Force overwrite of an existing short cut. 
-s : Make shortcut simple (don’t use LinkResolve) 
Export options 
-u [spec] : ECHO the contents of an existing shortcut.
'all' is the same as 'natdix' but the letters
of 'natdix' specify the options to be exported 
(the same option can be specified more 
than once 
e.g. -u natn) 
-l logfile : Save any error messages in the specified file 


If shortcut.exe fails to create a new shortcut, it does NOT set an errorlevel. 
Example
@ECHO off
MD %userprofile%"\start menu\programs\MY APP" 
SHORTCUT -f -t C:\MyApp.exe -n %userprofile%"\start menu\programs\MY 
APP\MY APP" 
An alternative for Windows XP and above, is to use 
VBScript
, call the VB script with cscript like 
so:
CSCRIPT C:\myshortcut.vbs
Optional sections in the VBscript below are commented out: 
Set oWS = WScript.CreateObject("WScript.Shell") 
sLinkFile = "C:\MyShortcut.LNK" 
Set oLink = oWS.CreateShortcut(sLinkFile) 
oLink.TargetPath = "C:\Program Files\MyApp\MyProgram.EXE" 
' oLink.Arguments = "" 
' oLink.Description = "MyProgram" 
' oLink.HotKey = "ALT+CTRL+F" 
' oLink.IconLocation = "C:\Program Files\MyApp\MyProgram.EXE, 2" 
' oLink.WindowStyle = "1" 
' oLink.WorkingDirectory = "C:\Program Files\MyApp" 
oLink.Save 

tải về 1.67 Mb.

Chia sẻ với bạn bè của bạn:
1   ...   78   79   80   81   82   83   84   85   ...   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