Dos Commands

How To Start Dos

1. Go to Start Click Run.

2.Type Cmd On Run and press Enter.

Dos Will start.

 

Dos Commands

1. Assoc :- 


with the help of this command you can change file type through their extension.

syntax:-ASSOC .ext=filetype

example:-        assoc .xls=txtfile

here your excel file type will convert on text file and all excel file will open on notepad

2.Attrib :-


Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [[drive:] [path] filename] [/S [/D]]
+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
/S Processes files in all directories in the specified path.
/D Process folders as well.

3.Break :-


Break can be used to enable or disable the breaking capability of the computer. For example, if a user wanted to cancel a batch file or another MS-DOS processes, that user could press CTRL + C (break), which would then prompt the user if they wish to cancel the current process.

Turning break off will cancel CTRL + C; however, the user will still be able to press CTRL + PAUSE/BREAK and have the capability of getting out of a batch file or current running process.

Note: Newer versions of Windows (Windows ME, Windows 2000, Windows XP, and higher) only include this command for backwards compatibility and turning the break off has no effect.

BREAK [ON | OFF]

Type BREAK without a parameter to display the current BREAK setting.

4. BCDEDIT :-


Bcdedit is a really powerful tool that Windows Vista and Windows 7 uses to manage the boot loader entries.
BCDEDIT needs a boot loader file to boot your system.

A boot loader is a file that contains necessary information that instruct the system how to boot/start an operating system.
Windows 7 and Vista bootloader file is \bootmgr
Windows XP bootloader file is \ntldrBCDEDIT can support other bootloaders too, like grub for linux. You just have to place the bootloader file on the root of the boot manager partition. e.g. \grldr and you have a grub boot loader enabled.

Bcdedit edits a file called bcd , which is located in Windows 7's hidden partition under \boot\bcd.
In Vista, its located under C:\boot\bcd.

A boot entry consists of 4 main elements:
1. Identifier
The identifier is how the system has named the boot entry.
2. Device
The device is the drive or virtual image that the system will use to boot the boot entry.
3. Path
The path is the location on the device where the bootloader file is found.
4. Description
The description is the friendly name we give to our boot entry, e.g. "Windows 7"
Warning
IMPORTANT: make a backup of your bcd file first. To do that, type:

bcdedit /export C:\SAVEDBCD

This will create a file c:\savebcd which is your boot entry backup.
If you mess up, you can always undo changes by:

bcdedit /import c:\savedbcd

5.CACLS:- 

The cacls command enables a user to view and modify the ACLs of a file. If you're wanting to change the read/write, hidden, system settings of the file see the attrib command.

Displays or modifies access control lists (ACLs) of files

CACLS filename [/T] [/E] [/C] [/G user:perm] [/R user [...]] [/P user:perm [...]] [/D user [...]]
filename Displays ACLs.
/T Changes ACLs of specified files in the current directory and all subdirectories.
/E Edit ACL instead of replacing it.
/C Continue on access denied errors.
/G user:perm Grant specified user access rights.
Perm can be: R Read
W Write
C Change (write)
F Full control

/R user Revoke specified user's access rights (only valid with /E).
/P user:perm Replace specified user's access rights.
Perm can be: N None


R Read
W Write
C Change (write)
F Full control

/D user Deny specified user access.


Wildcards can be used to specify more that one file in a command. You can specify more than one user in a command.

Examples

cacls computerhelper777.txt

6. CALL :-


Enables a user to execute a batch file from within another batch file.


Calls one batch program from another.

CALL [drive:][path]filename [batch-parameters]

If Command Extensions are enabled, CALL changes as follows:

CALL command now accepts labels as the target of the CALL. The syntax is:

CALL :label arguments

A new batch file context is created with the specified arguments and control is passed to the statement after the label specified. You must "exit" twice by reaching the end of the batch script file twice. The first time you read the end, control will return to just after the CALL statement. The second time will exit the batch script. Type GOTO /? for a description of the GOTO :EOF extension that will allow you to "return" from a batch script.

In addition, expansion of batch script argument references (%0, %1, etc.) have been changed as follows:

%* in a batch script refers to all the arguments (e.g. %1 %2 %3 %4 %5 ...)

Substitution of batch parameters (%n) has been enhanced. You can now use the below optional syntax:
%~1 expands %1 removing any surrounding quotes (")
%~f1 expands %1 to a fully qualified path name
%~d1 expands %1 to a drive letter only
%~p1 expands %1 to a path only
%~n1 expands %1 to a file name only
%~x1 expands %1 to a file extension only
%~s1 expanded path contains short names only
%~a1 expands %1 to file attributes
%~t1 expands %1 to date/time of file
%~z1 expands %1 to size of file
%~$PATH:1 searches the directories listed in the PATH
environment variable and expands %1 to the fully
qualified name of the first one found. If the
environment variable name is not defined or the
file is not found by the search, then this
modifier expands to the empty string


The modifiers can be combined to get compound results:
%~dp1 expands %1 to a drive letter and path only
%~nx1 expands %1 to a file name and extension only
%~dp$PATH:1 searches the directories listed in the PATH
environment variable for %1 and expands to the
drive letter and path of the first one found.

%~ftza1 expands %1 to a DIR-like output line


In the above examples, %1 and PATH can be replaced by other valid values. The %~ syntax is terminated by a valid argument number. The %~ modifiers may not be used with %*

Examples

call computerhelper777.bat

7.CD :-

Type CD drive: to display the current directory in the specified drive.
Type CD without parameters to display the current drive and directory.

CHDIR [/D] [drive:][path]
CHDIR [..]
CD [/D] [drive:][path]
CD [..]

.. Specifies that you want to change to the parent directory.

Use the /D switch to change current drive in addition to changing current directory for a drive.

If Command Extensions are enabled CHDIR changes as follows:

The current directory string is converted to use the same case as the on disk names. So CD C:\TEMP would actually set the current directory to C:\Temp if that is the case on disk.

CHDIR command does not treat spaces as delimiters, so it is possible to CD into a subdirectory name that contains a space without surrounding the name with quotes. For example:

cd \winnt\profiles\username\programs\start menu

is the same as:

cd "\winnt\profiles\username\programs\start menu"

which is what you would have to type if extensions were disabled.

8.CHCP :-

Displays or sets the active code page number.

CHCP [nnn]

nnn Specifies a code page number.

Type CHCP without a parameter to display the active code page number.

Examples

chcp

Display the page number.

chcp 447

Sets the active page to 437.

9.CHDIR :-

Display the name of or changes the current directory.
CHDIR [drive:][path]
CHDIR[..]
CD [drive:][path]
CD[..]

Examples

chdir\

Goes to the highest level, the root of the drive.

chdir..

Goes back one directory. For example, if you are within the C:\Windows\COMMAND> directory, this would take you to C:\Windows>

Windows 95, Windows 98 and later versions of windows allow you to go back more than one directory by using three or more dots. For example, typing chdir... with three dots after the cd would take you back two directories.

chdir windows.

10.CHKDSK :-


Checks a disk and displays a status report.

CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]]
volume Specifies the drive letter (followed by a colon), mount point, or volume name.
filename FAT only: Specifies the files to check for fragmentation.
/F Fixes errors on the disk.
/V On FAT/FAT32: Displays the full path and name of every file on the disk.
/R Locates bad sectors and recovers readable information (implies /F).
/L:size NTFS only: Changes the log file size to the specified number of kilobytes. If size is not specified, displays current size.
/X Forces the volume to dismount first if necessary. All opened handles to the volume would then be invalid (implies /F).
/I NTFS only: Performs a less vigorous check of index entries.
/C NTFS only: Skips checking of cycles within the folder structure.


The /I or /C switch reduces the amount of time required to run Chkdsk by skipping certain checks of the volume.

11.CHKNTFS :-





Displays or modifies the checking of disk at boot time.

CHKNTFS volume [...]
CHKNTFS /D
CHKNTFS /T[:time]
CHKNTFS /X volume [...]
CHKNTFS /C volume [...]
volume Specifies the drive letter (followed by a colon), mount point, or volume name.
/D Restores the machine to the default behavior; all drives are checked at boot time and chkdsk is run on those that are dirty.
/T:time Changes the AUTOCHK initiation count down time to the specified amount of time in seconds. If time is not specified, displays the current setting.
/X Excludes a drive from the default boot-time check. Excluded drives are not accumulated between command invocations.
/C Schedules a drive to be checked at boot time; chkdsk will run if the drive is dirty.


If no switches are specified, CHKNTFS will display if the specified drive is dirty or scheduled to be checked on next reboot.

11.CLS :-


Clears the screen.

CLS

12.CMD :-

Starts a new instance of the Windows 2000 or Windows XP command interpreter.

CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF] [[/S] [/C | /K] string]
/C Carries out the command specified by string and then terminates
/K Carries out the command specified by string but remains
/S Modifies the treatment of string after /C or /K (see below)
/Q Turns echo off
/D Disable execution of AutoRun commands from registry (see below)
/A Causes the output of internal commands to a pipe or file to be ANSI
/U Causes the output of internal commands to a pipe or file to be Unicode
/T:fg Sets the foreground/background colors (see COLOR /? for more info)
/E:ON Enable command extensions (see below)
/E:OFF Disable command extensions (see below)
/F:ON Enable file and directory name completion characters (see below)
/F:OFF Disable file and directory name completion characters (see below)
/V:ON Enable delayed environment variable expansion using c as the delimiter. For example, /V:ON would allow !var! to expand the variable var at execution time. The var syntax expands variables at input time, which is quite a different thing when inside of a FOR loop.
/V:OFF Disable delayed environment expansion.


Note that multiple commands separated by the command separator '&&' are accepted for string if surrounded by quotes. Also, for compatibility reasons, /X is the same as /E:ON, /Y is the same as /E:OFF and /R is the same as /C. Any other switches are ignored.

If /C or /K is specified, then the remainder of the command line after the switch is processed as a command line, where the following logic is used to process quote (") characters:

1. If all of the following conditions are met, then quote characters on the command line are preserved:

- no /S switch
- exactly two quote characters
- no special characters between the two quote characters, where special is one of: &<>()@^|
- there are one or more whitespace characters between the two quote characters
- the string between the two quote characters is the name of an executable file.

2. Otherwise, old behavior is to see if the first character is a quote character and if so, strip the leading character and remove the last quote character on the command line, preserving any text after the last quote character.

If /D was NOT specified on the command line, then when CMD.EXE starts, it looks for the following REG_SZ/REG_EXPAND_SZ registry variables, and if either or both are present, they are executed first.

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun

or

HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

Command Extensions are enabled by default. You may also disable extensions for a particular invocation by using the /E:OFF switch. You can enable or disable extensions for all invocations of CMD.EXE on a machine or user logon session by setting either or both of the following REG_DWORD values in the registry using REGEDT32.EXE:

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\EnableExtensions

or

HKEY_CURRENT_USER\Software\Microsoft\Command Processor\EnableExtensions

to either 0x1 or 0x0. The user specific setting takes precedence over the machine setting. The command line switches take precedence over the registry settings.

The command extensions involve changes or additions to the below commands.

DEL or ERASE
COLOR
CD or CHDIR
MD or MKDIR
PROMPT
PUSHD
POPD
SET
SETLOCAL
ENDLOCAL
IF
FOR
CALL
SHIFT
GOTO
START (also includes changes to external command invocation)
ASSOC
FType

To get specific details, type commandname /? to view the specifics.

Delayed environment variable expansion is NOT enabled by default. You can enable or disable delayed environment variable expansion for a particular invocation of CMD.EXE with the /V:ON or /V:OFF switch. You can enable or disable completion for all invocations of CMD.EXE on a machine or user logon session by setting either or both of the following REG_DWORD values in the registry using REGEDT32.EXE:

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\DelayedExpansion

or

HKEY_CURRENT_USER\Software\Microsoft\Command Processor\DelayedExpansion

to either 0x1 or 0x0. The user specific setting takes precedence over the machine setting. The command line switches take precedence over the registry settings.

If delayed environment variable expansion is enabled, then the exclamation character can be used to substitute the value of an environment variable at execution time.

File and Directory name completion is NOT enabled by default. You can enable or disable file name completion for a particular invocation of CMD.EXE with the /F:ON or /F:OFF switch. You can enable or disable completion for all invocations of CMD.EXE on a machine or user logon session by setting either or both of the following REG_DWORD values in the registry using REGEDT32.EXE:

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar

or

HKEY_CURRENT_USER\Software\Microsoft\Command Processor\CompletionChar
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar

with the hex value of a control character to use for a particular function (e.g. 0x4 is Ctrl-D and 0x6 is Ctrl-F). The user specific settings take precedence over the machine settings. The command line switches take precedence over the registry settings.

If completion is enabled with the /F:ON switch, the two control characters used are Ctrl-D for directory name completion and Ctrl-F for file name completion. To disable a particular completion character in the registry, use the value for space (0x20) as it is not a valid control character.

Completion is invoked when you type either of the two control characters. The completion function takes the path string to the left of the cursor appends a wild card character to it if none is already present and builds up a list of paths that match. It then displays the first matching path. If no paths match, it just beeps and leaves the display alone. Thereafter, repeated pressing of the same control character will cycle through the list of matching paths. Pressing the Shift key with the control character will move through the list backwards. If you edit the line in any way and press the control character again, the saved list of matching paths is discarded and a new one generated. The same occurs if you switch between file and directory name completion. The only difference between the two control characters is the file completion character matches both file and directory names, while the directory completion character only matches directory names. If file completion is used on any of the built in directory commands (CD, MD or RD) then directory completion is assumed.

The completion code deals correctly with file names that contain spaces or other special characters by placing quotes around the matching path. Also, if you backup, then invoke completion from within a line, the text to the right of the cursor at the point completion was invoked is discarded.

The special characters that require quotes are:
<space>
&()[]{}^=;!'+,`~

13.COLOR:-

Sets the default console foreground and background colors.

COLOR [attr]
attr Specifies color attribute of console output


Color attributes are specified by TWO hex digits -- the first corresponds to the background; the second the foreground. Each digit can be any of the below values.
0 = Black 8 = Gray
1 = Blue 9 = Light Blue
2 = Green A = Light Green
3 = Aqua B = Light Aqua
4 = Red C = Light Red
5 = Purple D = Light Purple
6 = Yellow E = Light Yellow
7 = White F = Bright White

14. COMP :-

Compares the contents of two files or sets of files.

COMP [data1] [data2] [/D] [/A] [/L] [/N=number] [/C]
data1 Specifies location and name(s) of first file(s) to compare.
data2 Specifies location and name(s) of second files to compare.
/D Displays differences in decimal format.
/A Displays differences in ASCII characters.
/L Displays line numbers for differences.
/N=number Compares only the first specified number of lines in each file.
/C Disregards case of ASCII letters when comparing files.


To compare sets of files, use wildcards in data1 and data2 parameters.

15. COMPACT :-

Displays or alters the compression of files on NTFS partitions.

COMPACT [/C | /U] [/S[:dir]] [/A] [/I] [/F] [/Q] [filename [...]]
/C Compresses the specified files. Directories will be marked so that files added afterward will be compressed.
/U Uncompresses the specified files. Directories will be marked so that files added afterward will not be compressed.
/S Performs the specified operation on files in the given directory and all subdirectories. Default "dir" is the current directory.
/A Displays files with the hidden or system attributes. These files are omitted by default.
/I Continues performing the specified operation even after errors have occurred. By default, COMPACT stops when an error is encountered.
/F Forces the compress operation on all specified files, even those that are already compressed. Already-compressed files are skipped by default.
/Q Reports only the most essential information.
filename Specifies a pattern, file, or directory.


Used without parameters, COMPACT displays the compression state of the current directory and any files it contains. You may use multiple filenames and wildcards. You must put spaces between multiple parameters.


16. CONVERT :- 

Converts FAT volumes to NTFS.

CONVERT volume /FS:NTFS [/V]
volume Specifies the drive letter (followed by a colon), mount point, or volume name.
/FS:NTFS Specifies that the volume to be converted to NTFS.
/V Specifies that Convert should be run in verbose mode.
CONVERT C:/FS:NTFS

17. COPY :-

Copies one or more files to another location.

COPY [/A | /B] source [/A | /B] [+ source [/A | /B] [+ ...]] [destination] [/A | /B]] [/V] [/Y | /-Y]
source Specifies the file or files to be copied.
/A Indicates an ASCII text file.
/B Indicates a binary file.
destination Specifies the directory or filename for the new file(s).
/V Verifies that new files are written correctly.
/Y Suppresses prompting to confirm you want to overwrite an existing destination file.
/-Y Causes prompting to confirm you want to overwrite an existing destination file.


The switch /Y may be preset in the COPYCMD environment variable. This may be overridden with /-Y on the command line.

To append files, specify a single file for destination, but multiple files for source (using wildcards or file1+file2+file3 format).

Examples

copy *.* a:

Copy all files in the current directory to the floppy disk drive.

Note: If there are hidden files they will not be copied. To copy all files including hidden files use the xcopy command.

copy autoexec.bat c:\windows


18. Cprofile :-

Cleans specified profiles of wasted space and, if user-specific file associations are disabled, removes these associations from the registry. Profiles that are currently in use are not modified.

Syntax
cprofile [/l] [/i] [/v] [FileList]
cprofile [/i] [/v] FileList


Parameters
/l : Cleans all local profiles. You can also specify a list of additional profiles in the FileList parameter.
/i : Interactively prompts the user with each profile.
/v : Displays information about the actions being performed.
FileList : A list of files from which you want to remove user-specific file associations. Separate each file in the list with a space. File names can contain wildcard characters.
/? : Displays help at the command prompt.

 

19. Date :-

Displays the current system date setting. Used without parameters, date displays the current system date setting and prompts you to type a new date.

Syntax
date [mm-dd-yy] [/t]


Parameters
mm-dd-yy : Sets the date specified where mm is month, dd is day, and yy is year.
/t : Displays the current date without prompting you for a new date.
/? : Displays help at the command prompt.


20.Defrag:-


Locates and consolidates fragmented boot files, data files, and folders on local volumes.
Syntax
defrag volume
defrag volume [/a]
defrag volume [/a] [/v]
defrag volume [/v]
defrag volume [/f]
Parameters
volume : The drive letter or a mount point of the volume to be defragmented.
/a : Analyzes the volume and displays a summary of the analysis report.
/v : Displays the complete analysis and defragmentation reports.
When used in combination with /a, displays only the analysis report. When used alone, displays both the analysis and defragmentation reports.
/f : Forces defragmentation of the volume regardless of whether it needs to be defragmented.
/? : Displays help at the command prompt.






21.Del (erase):-

Deletes specified files.
Syntax
del [Drive:][Path] FileName [ ...] [/p] [/f] [/s] [/q] [/a[:attributes]]
erase [Drive:][Path] FileName [ ...] [/p] [/f] [/s] [/q] [/a[:attributes]]

Parameters
[Drive:][Path] FileName : Specifies the location and name of the file or set of files you want to delete. Filename is required. You can use multiple file names. Separate file names with spaces, commas, or semicolons.
/p : Prompts you for confirmation before deleting the specified file.
/f : Forces deletion of read-only files.
/s : Deletes specified files from the current directory and all subdirectories. Displays the names of the files as they are being deleted.
/q : Specifies quiet mode. You are not prompted for delete confirmation.
/a : Deletes files based on specified attributes.
attributes : Specifies any of the following file attributes:
AttributeDescription
r
Read-only
a
Archive
s
System
h
Hidden
-
Prefix meaning "not"

 

22.Dir :-

Displays a list of a directory's files and subdirectories. Used without parameters, dir displays the disk's volume label and serial number, followed by a list of directories and files on the disk, including their names and the date and time each was last modified. For files, dir displays the name extension and the size in bytes. Dir also displays the total number of files and directories listed, their cumulative size, and the free space (in bytes) remaining on the disk.
Syntax
dir [Drive:][Path][FileName] [...] [/p] [/q] [/w] [/d] [/a[[:]attributes]][/o[[:]SortOrder]] [/t[[:]TimeField]] [/s] [/b] [/l] [/n] [/x] [/c] [/4]

Parameters
[Drive:][Path] : Specifies the drive and directory for which you want to see a listing.
[FileName] : Specifies a particular file or group of files for which you want to see a listing.
/p : Displays one screen of the listing at a time. To see the next screen, press any key on the keyboard.
/q : Displays file ownership information.
/w : Displays the listing in wide format, with as many as five file names or directory names on each line.
/d : Same as /w but files are sorted by column.


23.Diskcomp:-

Compares the contents of two floppy disks. Used without parameters, diskcomp uses the current drive for both disks that you want to compare.
Syntax
diskcomp [drive1: [drive2:]]

Parameters
drive1 : Specifies the drive containing one of the floppy disks.
drive2 : Specifies the drive containing the other floppy disk.
/? : Displays help at the command prompt.

 

24.Diskcopy:-

Copies the contents of the floppy disk in the source drive to a formatted or unformatted floppy disk in the destination drive. Used without parameters, diskcopy uses the current drive for the source disk and the destination disk.
Syntax
diskcopy [drive1: [drive2:]] [/v]

Parameters
drive1 : Specifies the drive containing the source disk.
drive2 : Specifies the drive containing the destination disk.
/v : Verifies that the information is copied correctly. This command-line option slows down the copying process.
/?: Displays help at the command prompt.

 

 

25.DiskPart:-

DiskPart.exe is a text-mode command interpreter that enables you to manage objects (disks, partitions, or volumes) by using scripts or direct input from a command prompt. Before you can use DiskPart.exe commands on a disk, partition, or volume, you must first list and then select the object to give it focus. When an object has focus, any DiskPart.exe commands that you type act on that object.
You can list the available objects and determine an object's number or drive letter by using the list disk, list volume, and list partition commands. The list disk and list volume commands display all disks and volumes on the computer. However, the list partition command only displays partitions on the disk that has focus. When you use the list commands, an asterisk (*) appears next to the object with focus. You select an object by its number or drive letter, such as disk 0, partition 1, volume 3, or volume C.
When you select an object, the focus remains on that object until you select a different object. For example, if the focus is set on disk 0, and you select volume 8 on disk 2, the focus shifts from disk 0 to disk 2, volume 8. Some commands automatically change the focus. For example, when you create a new partition, the focus automatically switches to the new partition.
You can only give focus to a partition on the selected disk. When a partition has focus, the related volume (if any) also has focus. When a volume has focus, the related disk and partition also have focus if the volume maps to a single specific partition. If this is not the case, then focus on the disk and partition is lost.
DiskPart commands
To view the command syntax, click a command:
active
On basic disks, marks the partition with focus as active. This informs the basic input/output system (BIOS) or Extensible Firmware Interface (EFI) that the partition or volume is a valid system partition or system volume
Only partitions can be marked as active.
 Important
•DiskPart verifies only that the partition is capable of containing an operating system's startup files. DiskPart does not check the contents of the partition. If you mistakenly mark a partition as "active" and it does not contain the operating system's startup files, your computer might not start.

Syntax
active
add disk
Mirrors the simple volume with focus to the specified disk.

Syntax
add disk=n [noerr]

26.Doskey:-


Calls Doskey.exe, which recalls Windows XP commands, edits command lines, and creates macros.
Syntax
doskey {/reinstall | /listsize=size | /macros:[{all | exename}] | /history | /insert | /overstrike | /exename=exename | /macrofile=FileName | macroname=[text]}
Parameters
/reinstall : Installs a new copy of Doskey.exe. Clears the command history buffer.
/listsize=size : Specifies the maximum number of commands in the history buffer.
/macros : Displays a list of all doskey macros. You can use a redirection symbol (>) with /macros to redirect the list to a file. You can abbreviate /macros to /m.
all : Displays doskey macros for all executables.
exename : Displays doskey macros for the specified executable.
/history : Displays all commands stored in memory. You can use a redirection symbol (>) with /history to redirect the list to a file. You can abbreviate /history as /h.
{/insert | /overstrike} : Specifies whether new text you type is to replace old text. If you use /insert, new text that you type on a line is inserted into old text (that is, as if you pressed the INSERT key). If you use /overstrike, new text replaces old text. The default setting is /overstrike.
/exename=exename : Specifies the program (that is, executable) in which the doskey macro runs.
/macrofile=FileName : Specifies a file containing macros that you want to install.
macroname=[text] : Creates a macro that carries out the commands specified by text. Macroname specifies the name you want to assign to the macro. Text specifies the commands you want to record. If text is left blank, macroname is cleared of any assigned commands.
/? : Displays help at the command prompt.

 

27.Driverquery:-

Displays a list of all installed device drivers and their properties.
Syntax
driverquery  [/s Computer] [/u Domain\User /p Password] [/fo {TABLE|LIST|CSV}] [/nh] [/v] [/si]
Parameters
/s Computer : Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer.
/u Domain\User : Runs the command with the account permissions of the user specified by User or Domain\User. The default is the permissions of the current logged on user on the computer issuing the command.
/p Password : Specifies the password of the user account that is specified in the /u parameter.
/fo {TABLE|LIST|CSV} : Specifies the format to display the driver information. Valid values are TABLE, LIST, and CSV. The default format for output is TABLE.
/nh : Omits the header row from the displayed driver information. Valid when the /fo parameter is set to TABLE or CSV.
/v : Specifies that detailed driver information be displayed.
/si : Displays digital signature information for both signed and unsigned device drivers.
/?: Displays help at the command prompt.
Examples
The following examples show how you can use the driverquery command:
driverquery
driverquery /fo csv
driverquery /nh
driverquery /s ipaddress





No comments:

Post a Comment