text
stringlengths
0
4.23k
$$
Specifies the dollar-sign character ($).
$1 through $9
Represent any command-line information you want to specify when you run the macro. The special characters $1 through $9 are batch parameters that enable you to use different data on the command line each time you run the macro. The $1 character in a doskey command is similar to the %1 character in a batch program.
$*
Represents all the command-line information that you want to specify when you type the macro name. The special character $* is a replaceable parameter that is similar to the batch parameters $1 through $9, with one important difference: everything you type on the command line after the macro name is substituted for the $* in the macro.
$G
$g
>
$G$G
$g$g
>>
$L
$l
<
$B
$b
(
*
$T
$t
&
$$
$
$1
$9
$1
$9
$1
%1
$*
$*
$1
$9
$*
To run a macro, type the macro name at the command prompt, starting at the first position. If the macro was defined with $* or any of the batch parameters $1 through $9, use a space to separate the parameters. You cannot run a doskey macro from a batch program.
$*
$1
$9
If you always use a particular command with specific command-line options, you can create a macro that has the same name as the command. To specify whether you want to run the macro or the command, follow these guidelines:
To run the macro, type the macro name at the command prompt. Do not add a space before the macro name.
To run the command, insert one or more spaces at the command prompt, and then type the command name.
Examples
The /macros and /history command-line options are useful for creating batch programs to save macros and commands. For example, to store all current doskey macros, type:
doskey /macros > macinit
To use the macros stored in Macinit, type:
doskey /macrofile=macinit
To create a batch program named Tmp.bat that contains recently used commands, type:
doskey /history> tmp.bat
To define a macro with multiple commands, use $t to separate commands, as follows:
$t
doskey tx=cd temp$tdir/w $*
In the preceding example, the TX macro changes the current directory to Temp and then displays a directory listing in wide display format. You can use $* at the end of the macro to append other command-line options to dir when you run the tx option.
$*
The following macro uses a batch parameter for a new directory name:
doskey mc=md $1$tcd $1
The macro creates a new directory and then changes to the new directory from the current directory.
To use the preceding macro to create and change to a directory named Books, type:
mc books
To create a doskey macro for a program called Ftp.exe, include /exename as follows:
doskey /exename=ftp.exe go=open 172.27.1.100$tmget *.TXT c:\reports$tbye
To use the preceding macro, start FTP. At the FTP prompt, type:
go
FTP runs the open, mget, and bye commands.
To create a macro that quickly and unconditionally formats a disk, type:
doskey qf=format $1 /q /u
To quickly and unconditionally format a disk in drive A, type:
qf a:
To delete a macro called vlist, type:
doskey vlist =
driverquery
Enables an administrator to display a list of installed device drivers and their properties. If used without parameters, driverquery runs on the local computer.
Syntax
driverquery [/s <system> [/u [<domain>\]<username> [/p <password>]]] [/fo {table | list | csv}] [/nh] [/v | /si]
Parameters
Parameter
Description
/s <system>
Specifies the name or IP address of a remote computer. Do not use backslashes. The default is the local computer.
/u [<domain>]<username>
Runs the command with the credentials of the user account as specified by user or domain\user. By default, /s uses the credentials of the user who is currently logged on to the computer that is issuing the command. /u can't be used unless /s is specified.