Your best source of information and news about secrets , windows vista and microsoft on the internet 你的最佳信息来源和新闻秘密, windows vista中,微软对互联网

Vista ARTICLES vista的文章 TOP 50前50名 Vista VIDEOS vista的录像 Vista SOFT天地软 Vista HELP vista的帮助

Generate a report of installed drivers生成一份报告,已安装的司机


I came across this built-in command that works under XP, 2003, and Vista.我偶然看到这个内置式指挥工程xp的, 2003年和眼界。

From the command line you can type:从指挥线,你可以键入:

driverquery driverquery

And it will immediately come back with a complete list of drivers它会立即回来了一份完整的名单上的司机

司机名单

Better yet, the program is loaded with options.会更美好,程序装载选项。 If we look at the help screen for it:如果我们看一看在帮助屏幕为:

Parameter List: 参数表:
/S system Specifies the remote system to connect to. / s系统指明远程系统连接。

/U [domain\]user Specifies the user context / u的[域\ ]用户指明用户背景
under which the command should execute. 根据该命令应执行的。

/P [password] Specify the Password for the given / p [密码]指定密码,为给定
user context. 用户背景。 Prompts for input if omitted. 提示输入,如果省略。

/FO format Specifies the type of output to display. /为格式指明类型的输出到显示器。
Valid values to be passed with the 合法的数值要通过同
switch are "TABLE", "LIST", "CSV". 开关是"表" , "名单" , " csv " 。

/NH Specifies that the "Column Header" / nh明确规定, "列标题"
should not be displayed in the 不应被陈列在
screen output. 屏幕输出。 Valid for "TABLE" 有效期为"表格"
and "CSV" format only. 和" csv "的形式而已。

/V Displays detailed information. / v显示器的详细资料。 Not valid 不成立
for signed drivers. 为签订司机。

/SI Provides information about signed drivers. /硅提供的资料,签名司机。

/? /吗? Displays this Help/Usage. 显示器这种帮助/用法。


We can see that it is possible to query a computer remotely.我们可以看到,这是可以做到的质疑电脑遥控。 I was going to build a simple program to do this for me...but is already built in!我本来打算建立一个简单的程序来做到这一点,我… …但已经建成了!

My purpose was that I wanted to create a report of drivers on computers across my network.我的目的是想创造一个报告的司机对电脑我的网络。 To accomplish this, it required two batch files.要做到这一点,它需要两个批处理文件。

I first created a batch file that looks like this:首先,我创造了一个批处理文件看起来像这样:

@echo =========================================== @回声===========================================
@echo Driver Report for Computer: %1 @回声司机报告,供电脑: % 1
@echo =========================================== @回声===========================================
@driverquery /s %1 /u intelliadmin\administrator /p [Password Removed] @ driverquery /秒% 1 / u的intelliadmin \管理员/ p [密码清除]
@echo @回声

Lets save that as DriverReport.bat可以节省由于driverreport.bat

The script will run a driver query against a remote computer with the specified username and password...and will output to the command line a nicely formatted report.脚本会跑司机质疑,对一个远程计算机与特定的用户名和密码… …以及将输出到指挥所在线a好话格式化报告。 The computer name will be provided as the first command line parameter (That is what %1 is for)计算机名,将提供作为第一个命令行参数(这是什么% 1是)

Also - if you notice - you will need to put your password as cleartext in this batch file...so make sure you delete it when done.同时-如果你发现-你需要把你的密码作为cl eartext在此批处理文件.. .所以,一定要你删除它的时候这样做。

Now, we need to create another batch file that will actually generate the report.现在,我们需要创建另一个批处理文件,其实只会产生报告。 Here is my first crack at it:这里是我的第一个打击,在这:


@del Report.txt @ del report.txt
@DriverReport.bat Computer1 >> Report.txt @ driverreport.bat computer1 > > report.txt
@DriverReport.bat Computer2 >> Report.txt @ driverreport.bat computer2 > > report.txt
@DriverReport.bat Computer3 >> Report.txt @ driverreport.bat computer3 > > report.txt
@DriverReport.bat Computer4 >> Report.txt @ driverreport.bat computer4 > > report.txt
@DriverReport.bat Computer5 >> Report.txt @ driverreport.bat computer5 > > report.txt
@DriverReport.bat Computer6 >> Report.txt @ driverreport.bat computer6 > > report.txt


It deletes any report we created before, and then generates a report for each system...then takes the output and appends it to Report.txt它删去了报告中,我们创造了面前,然后生成一份报告,供各系统… …然后输出和后面附加它report.txt

Simply fill out the batch file with your computer names.只需填写该批处理文件与你的计算机名字。 You could probably throw together a vb script that would populate it for you.你大概可以扔了一个vb的脚本会青睐它给你。

Lets save that last script as GenerateReport.bat可以节省那最后的脚本作为generatereport.bat

Now when you call it (GenerateReport.bat), Report.txt will contain a complete driver list for the computers you include.现在,当你说它( generatereport.bat ) , report.txt将包含一个完整的司机名单,为你的电脑包括。

Just make sure you put both batch files in the same folder - and be careful with your admin password.刚刚确定你把两个批处理文件在同一文件夹-及小心你的管理员密码。 Don't leave it laying around on your network in that first batch file.不离开它周围铺设于你的网络中,首先批处理文件。


Written by Steve Wiseman. 作者史蒂夫wiseman 。 Read more great feeds at is source 阅读更多伟大的饲料,是源头 WEBSITE 网页
3 comments 3条评论 .
Read more articles on 阅读更多文章 software 软件 .

Related articles相关文章

3 comments 3条评论

Read the comments left by other users below, or:阅读评论留给其他用户以下,或:

了解你自己gravatar通过访问gravatar.com Keith 基思
#1 # 1 . November 4th, 2007, at 4:28 PM. 2007年11月4日,在下午4时28分。

Windows XP returns an error message that “driverquery” is not recognized. windows xp的回报错误讯息,即" driverquery " ,是不承认。 Any suggestions?任何建议?

了解你自己gravatar通过访问gravatar.com Crunchman crunchman
#2 # 2 . November 4th, 2007, at 5:35 PM. 2007年11月4日,在下午5时35分。

Do a barrel roll.做桶滚。

了解你自己gravatar通过访问gravatar.com Alfonso Bedoya 阿方bedoya
#3 # 3 . November 4th, 2007, at 6:58 PM. 2007年11月4日,在下午6时58分。

For XP, Professional only.为xp的,专业只。

Leave your comment...留下你的评论...

If you want to leave your comment on this article, simply fill out the next form:如果你不想让你对此有何评论文章,只需填妥下表:




You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> .你可以使用这些标签的xhtml : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> < i > <strike> <strong>第。