prndrvr.vbs
This page is from Microsoft
Updated: January 21, 2005
Adds, deletes, and lists printer drivers. Used without
parameters, prndrvr.vbs displays command-line help for the
prndrvr.vbs command.
Syntax
cscript prndrvr.vbs-a [-m DriverName] [-v
{0 | 1 | 2 | 3}] [-e
Environment] [-s RemoteComputer] [-h
Path] [-i FileName.inf] [-u
UserName -w Password]
Parameters
-a
Required. Specifies that you want to install a
driver.
-mDriverName
Specifies, by name, the driver you want to install.
Drivers are often named for the model of printer
they support. See the printer documentation for more
information.
-v {0 | 1 | 2 | 3}
Specifies the version of the driver you want to
install. See the description of the -e
Environment parameter for information on which
versions are available for which environment. If you
do not specify a version, the version of the driver
appropriate for the version of Windows running on
the computer on which you are installing the driver
is installed.Version 0 supports Windows 95,
Windows 98, and Windows Millennium Edition.Version
1 supports Windows NT 3.51.Version 2
supports Windows NT 4.0.Version 3 supports
Windows XP, Windows 2000, and the Windows
Server 2003 family.
-eEnvironment
Specifies the environment for the driver you want to
install. If you do not specify an environment, the
environment of the computer on which you are
installing the driver is used. The following table
lists the driver environments that are available and
the versions that are available for each.
EnvironmentAvailable versions"Windows NT x86"1,
2, and 3"Windows NT Alpha_AXP"1 and 2"Windows
IA64"3"Windows NT R4000"1"Windows NT
PowerPC"1"Windows 4.0"0
-sRemoteComputer
Specifies the remote computer on which you want to
install the driver. If you do not specify a
computer, the driver is installed on the local
computer.
-hPath
Specifies the path to the driver file. If you do not
specify a path, the path to the location from which
Windows was installed is used.
-iFileName.inf
Specifies the file name for the driver you want to
install. If you do not specify a file name,
ntprint.inf is used.
-uUserName-wPassword
Specifies an account with permissions to connect by
using Windows Management Instrumentation (WMI)
services to the computer on which you want to
install the driver. All members of the
Administrators group for that computer have these
permissions, but the permissions can also be granted
to other users. If you do not specify an account,
you must be logged on under an account with these
permissions for the command to work. For more
information on WMI, see Related Topics.
/?
Displays help at the command prompt.
Remarks
- This command starts a script that is located in the
systemroot\system32 directory. You must type this command at
a command prompt with that directory as the current directory,
or you must type the full path to that directory at the
beginning of the cscript command.
- If the information that you supply contains spaces, use
quotation marks around the text (for example, "Computer Name").
Examples
To add version 3 of the printer driver named "Color Printer
Driver 1" to the local computer, which offers a Windows NT
x86-based environment, type:
cscript prndrvr.vbs -a -m
"Color Printer Driver 1" -v 3 -e "Windows NT x86"
Return to Top
Syntax
cscript prndrvr.vbs-d [-s RemoteComputer]
-m DriverName -v {0 | 1 |
2 | 3} -e Environment [-u
UserName -w Password]
Parameters
-d
Required. Specifies that you want to delete a
driver.
-sRemoteComputer
Specifies the remote computer from which you want to
delete the driver. If you do not specify a computer,
the driver is deleted from the local computer.
-mDriverName
Required. Specifies, by name, the driver you want to
delete. Drivers are often named for the model of
printer they support. See the printer documentation
for more information.
-v {0 | 1 | 2 | 3}
Required. Indicates the version of the driver to be
deleted. See the description of the -e
Environment parameter for information on which
versions are available in which environment. Version
0 supports Windows 95, Windows 98, and
Windows Millennium Edition.Version 1 supports
Windows NT 3.51.Version 2 supports Windows NT
4.0.Version 3 supports Windows XP and
Windows 2000.
-eEnvironment
Required. Specifies the environment for the driver
you want to delete. The following table lists the
driver environments that are available and the
versions that are available for each.
EnvironmentAvailable versions"Windows NT x86"1,
2, and 3"Windows NT Alpha_AXP"1 and 2"Windows
IA64"3"Windows NT R4000"1"Windows NT
PowerPC"1"Windows 4.0"0
-uUserName-wPassword
Specifies an account with permissions to connect by
using Windows Management Instrumentation (WMI)
services to the computer from which you want to
delete the driver. All members of the Administrators
group for that computer have these permissions, but
the permissions can also be granted to other users.
If you do not specify an account, you must be logged
on under an account with these permissions for the
command to work. For more information on WMI, see
Related Topics.
/?
Displays help at the command prompt.
Remarks
- This command starts a script that is located in the
systemroot\system32 directory. You must type this command at
a command prompt with that directory as the current directory,
or you must type the full path to that directory at the
beginning of the cscript command.
- When you delete a printer driver, you must include both the
environment and the version parameters.
- If the information that you supply contains spaces, use
quotation marks around the text (for example, "Computer Name").
Return to Top
Syntax
cscript prndrvr.vbs-l [-sRemoteComputer] [-uUserName-wPassword]
Parameters
-l
Required. Specifies that you want to list all the
drivers on a computer.
-sRemoteComputer
Indicates the remote computer whose drivers you want
to list. If you do not specify a computer, drivers
on the local computer are listed.
-uUserName-wPassword
Specifies an account with permissions to connect by
using Windows Management Instrumentation (WMI)
services to the computer whose drivers you want to
list. All members of the Administrators group for
that computer have these permissions, but the
permissions can also be granted to other users. If
you do not specify an account, you must be logged on
under an account with these permissions for the
command to work. For more information on WMI, see
Related Topics.
/?
Displays help at the command prompt.
Remarks
- This command starts a script that is located in the
systemroot\system32 directory. You must type this command at
a command prompt with that directory as the current directory,
or you must type the full path to that directory at the
beginning of the cscript command.
- If the information that you supply contains spaces, use
quotation marks around the text (for example, "Computer Name").
Return to Top
Syntax
cscript prndrvr.vbs-x [-s RemoteComputer] [-u
UserName -w Password]
Parameters
-x
Required. Specifies that you want to delete all
unused printer drivers from a computer. This
parameter deletes printer drivers that are installed
for clients running other versions of Windows. The
Fax component might require these drivers when it is
used as a fax server for computers running
Windows 95, Windows 98, Windows Millennium Edition,
and Windows NT 4.0 client computers. This parameter
also deletes the primary fax driver if it is not in
use. If you delete a driver that is being used by
the Fax component, you must reinstall the fax
component or it will not function correctly.
-sRemoteComputer
Specifies the remote computer from which you want to
delete drivers. If you do not specify a computer,
drivers are deleted from the local computer.
-uUserName-wPassword
Specifies an account with permissions to connect by
using Windows Management Instrumentation (WMI)
services to the computer from which you want to
delete drivers. All members of the Administrators
group for that computer have these permissions, but
the permissions can also be granted to other users.
If you do not specify an account, you must be logged
on under an account with these permissions for the
command to work. For more information on WMI, see
Related Topics.
/?
Displays help at the command prompt.
Remarks
- This command starts a script that is located in the
systemroot\system32 directory. You must type this command at
a command prompt with that directory as the current directory,
or you must type the full path to that directory at the
beginning of the cscript command.
- If the information that you supply contains spaces, use
quotation marks around the text (for example, "Computer Name").
Return to Top
Formatting legend
Italic |
Information that the user must supply |
Bold |
Elements that the user must type exactly as shown |
Ellipsis (...) |
Parameter that can be repeated several times in a
command line |
Between brackets ([]) |
Optional items |
Between braces ({}); choices separated by pipe (|).
Example: {even|odd} |
Set of choices from which the user must choose only
one |
Courier font |
Code or program output |
|
|