批处理之家's Archiver

Batcher 发表于 2009-1-4 21:22

[有奖翻译]T001:命令行工具NirCmd.exe2.20(综合性工具)

【活动说明】[url]http://bbs.bathome.net/thread-2991-1-1.html[/url]

【官方下载】[url]http://www.nirsoft.net/utils/nircmd.html[/url]

【本地下载】[url]http://bbs.bathome.net/thread-1881-1-1.html[/url]

【任务内容】

[b]Description[/b]

NirCmd is a small command-line utility that allows you to do some useful tasks without displaying any user interface. By running NirCmd with simple command-line option, you can write and delete values and keys in the Registry, write values into INI file, dial to your internet account or connect to a VPN network, restart windows or shut down the computer, create shortcut to a file, change the created/modified date of a file, change your display settings, turn off your monitor, open the door of your CD-ROM drive, and more...

[b]Examples of what you can do with NirCmd[/b]

[table][tr][td]Open the door of J: CD-ROM drive[/td][td]nircmd.exe cdrom open j:[/td][/tr][tr][td]Close the door of Y: CD-ROM drive[/td][td]nircmd.exe cdrom close y:[/td][/tr][tr][td]Increase the system volume by 2000 units (out of 65535)[/td][td]nircmd.exe changesysvolume 2000[/td][/tr][tr][td]Decrease the system volume by 5000 units (out of 65535)[/td][td]nircmd.exe changesysvolume -5000[/td][/tr][tr][td]Set the volume to the highest value[/td][td]nircmd.exe setsysvolume 65535[/td][/tr][tr][td]Mute the system volume[/td][td]nircmd.exe mutesysvolume 1[/td][/tr][tr][td]Unmute the system volume[/td][td]nircmd.exe mutesysvolume 0[/td][/tr][tr][td]Switch the system volume between the mute and normal state.[/td][td]nircmd.exe mutesysvolume 2[/td][/tr][tr][td]Create a shortcut on your desktop that switch the system volume between the mute and normal state.[/td][td]nircmd.exe cmdshortcut "~$folder.desktop$" "Switch Volume" mutesysvolume 2[/td][/tr][tr][td]Turn off the monitor[/td][td]nircmd.exe monitor off[/td][/tr][tr][td]Start the default screen saver[/td][td]nircmd.exe screensaver[/td][/tr][tr][td]Put your computer in 'standby' mode[/td][td]nircmd.exe standby[/td][/tr][tr][td]log off the current user[/td][td]nircmd.exe exitwin logoff[/td][/tr][tr][td]Ask if you want to reboot, and if you answer 'Yes', reboot the computer.[/td][td]nircmd.exe qboxcom "Do you want to reboot ?" "question" exitwin reboot[/td][/tr][tr][td]Turn off your computer[/td][td]nircmd.exe exitwin poweroff[/td][/tr][tr][td]Turn off all computers specified in computers.txt ![/td][td]multiremote copy "c:\temp\computers.txt" exitwin poweroff force[/td][/tr][tr][td]Dial to "My Internet" connection[/td][td]nircmd.exe rasdial "My Internet"[/td][/tr][tr][td]Disconnect the "My Internet" connection[/td][td]nircmd.exe rashangup "My Internet"[/td][/tr][tr][td]Make your Internet Explorer windows 75% transparent ! (192 / 256)[/td][td]nircmd.exe win trans ititle "internet explorer" 192[/td][/tr][tr][td]Minimize all your Internet Explorer windows[/td][td]nircmd.exe win min class "IEFrame"[/td][/tr][tr][td]Close all your Internet Explorer windows[/td][td]nircmd.exe win close class "IEFrame"[/td][/tr][tr][td]Close all your Explorer windows (My Computer, folders, and so on)[/td][td]nircmd.exe win close class "CabinetWClass"[/td][/tr][tr][td]Hide all your Internet Explorer windows[/td][td]nircmd.exe win hide class "IEFrame"[/td][/tr][tr][td]Show all your Internet Explorer windows (after you made them hidden with previous example)[/td][td]nircmd.exe win show class "IEFrame"[/td][/tr][tr][td]Center all top-level windows[/td][td]nircmd.exe win center alltop[/td][/tr][tr][td]Remove the title bar of My Computer window.[/td][td]nircmd.exe win -style title "my computer" 0x00C00000[/td][/tr][tr][td]Return the title bar of My Computer window that we removed in the previous example.[/td][td]nircmd.exe win +style title "my computer" 0x00C00000[/td][/tr][tr][td]Set the My Computer window to right-to-left order (For hebrew and arabic languages)[/td][td]nircmd win +exstyle title "my computer" 0x00400000[/td][/tr][tr][td]Set all child windows of My Computer window to right-to-left order (For hebrew and arabic languages)[/td][td]nircmd win child title "my computer" +exstyle all 0x00400000[/td][/tr][tr][td]Create a shortcut on your desktop that closes all your Internet Explorer windows[/td][td]nircmd.exe cmdshortcut " "~$folder.desktop$ "Close All IE" win close class "IEFrame"[/td][/tr][tr][td]Create a shortcut on your desktop that hides all your Internet Explorer windows[/td][td]nircmd.exe cmdshortcut " "~$folder.desktop$ "Hide All IE" win hide class "IEFrame"[/td][/tr][tr][td]Create a shortcut on your desktop that shows back all your Internet Explorer windows[/td][td]nircmd.exe cmdshortcut " "~$folder.desktop$ "Show All IE" win show class "IEFrame"[/td][/tr][tr][td]Set the Windows Calculator as top-most window (above all other windows)[/td][td]nircmd.exe win settopmost title "Calculator" 1[/td][/tr][tr][td]Set the Windows Calculator back to regular window (non top-most window)[/td][td]nircmd.exe win settopmost title "Calculator" 0[/td][/tr][tr][td]Create a shortcut to Windows calculator under Start Menu->Programs->Calculators[/td][td]nircmd.exe shortcut "f:\winnt\system32\calc.exe" "~$folder.programs$\Calculators" "Windows Calculator"[/td][/tr][tr][td]Hide the desktop window[/td][td]nircmd.exe win hide class progman[/td][/tr][tr][td]Show the desktop window (After hiding it in previous example)[/td][td]nircmd.exe win show class progman[/td][/tr][tr][td]Hide the start button on the system tray[/td][td]nircmd.exe win child class "Shell_TrayWnd" hide class "button"[/td][/tr][tr][td]Show the start button on the system tray[/td][td]nircmd.exe win child class "Shell_TrayWnd" show class "button"[/td][/tr][tr][td]Hide the clock on the system tray[/td][td]nircmd.exe win child class "Shell_TrayWnd" hide class "TrayClockWClass"[/td][/tr][tr][td]Show the clock on the system tray[/td][td]nircmd.exe win child class "Shell_TrayWnd" show class "TrayClockWClass"[/td][/tr][tr][td]Kill (terminate) all instance of Internet Explorer processes[/td][td]nircmd.exe killprocess iexplore.exe[/td][/tr][tr][td]Create a shortcut on your desktop that opens the door of K: CDROM drive when you run it.[/td][td]nircmd.exe cmdshortcut "~$folder.desktop$" "Open CDROM" cdrom open k:[/td][/tr][tr][td]Create a shortcut to NirSoft Web site on your desktop[/td][td]nircmd.exe urlshortcut "http://www.nirsoft.net" "~$folder.desktop$" "NirSoft"[/td][/tr][tr][td]Add NirSoft Web site to your Favorities under Links folder.[/td][td]nircmd.exe urlshortcut "http://www.nirsoft.net" "~$folder.favorites$\Links" "NirSoft"[/td][/tr][tr][td]Create a shortcut to NirSoft Web site on the desktop of all computers listed in computers.txt[/td][td]nircmd.exe multiremote copy "c:\temp\computers.txt" urlshortcut "http://www.nirsoft.net" "~$folder.common_desktop$" "NirSoft"[/td][/tr][tr][td]Set the display mode to 800x600x24bit colors[/td][td]nircmd.exe setdisplay 800 600 24[/td][/tr][tr][td]Create a shortcut on the desktop that set the display mode to 800x600x24bit colors[/td][td]nircmd.exe cmdshortcut "~$folder.desktop$" "800x600x24" setdisplay 800 600 24[/td][/tr][tr][td]Copy all shortcuts on your desktop to another folder (f:\temp\desktop).[/td][td]nircmd.exe execmd copy "~$folder.desktop$\*.lnk" f:\temp\desktop[/td][/tr][tr][td]Restart your Apache server (under Windows NT/2000/XP/2003)[/td][td]nircmd.exe service restart apache[/td][/tr][tr][td]Create a shortcut on your desktop that restarts the Apache server[/td][td]nircmd.exe cmdshortcut "~$folder.desktop$" "Restart Apache" service restart apache[/td][/tr][tr][td]Restart your IIS[/td][td]nircmd.exe service restart w3svc[/td][/tr][tr][td]Restart MySql[/td][td]nircmd.exe service restart MySql[/td][/tr][tr][td]Open the desired Registry key/value in RegEdit[/td][td]nircmd.exe regedit "HKLM\Software\Microsoft\Windows\CurrentVersion" "CommonFilesDir"[/td][/tr][tr][td]Open the Registry key that you copied to the clipboard in RegEdit.[/td][td]nircmd regedit "~$clipboard$"[/td][/tr][tr][td]Disable the screen saver[/td][td]nircmd.exe regsetval sz "HKCU\control panel\desktop" "ScreenSaveActive" 0[/td][/tr][tr][td]Enable the screen saver[/td][td]nircmd.exe regsetval sz "HKCU\control panel\desktop" "ScreenSaveActive" 1[/td][/tr][tr][td]Change the date/time of the specified filename (creation time and modified time)[/td][td]nircmd.exe setfiletime "c:\temp\myfile.txt" "24-06-2003 17:57:11" "22-11-2005 10:21:56"[/td][/tr][tr][td]Copy your desktop folder path to the clipboard[/td][td]nircmd.exe clipboard set ~$folder.desktop$[/td][/tr][tr][td]Copy your start menu folder path to the clipboard[/td][td]nircmd.exe clipboard set ~$folder.start_menu$[/td][/tr][tr][td]Copy the content of info1.txt (simple text file) to the clipboard[/td][td]nircmd.exe clipboard readfile "c:\My Files\info1.txt"[/td][/tr][tr][td]Add the text content of clipboard to info1.txt[/td][td]nircmd.exe clipboard addfile "c:\My Files\info1.txt"[/td][/tr][tr][td]Clear the clipboard[/td][td]nircmd.exe clipboard clear[/td][/tr][tr][td]Create all folders specified in "c:\temp\folders.txt". The folder path names are separated by CRLF characters.[/td][td]nircmd.exe paramsfile "c:\temp\folders.txt" "" "" execmd md ~$fparam.1$[/td][/tr][tr][td]Install the specified .NET assembly in the global assembly cache (like gacutil)[/td][td]nircmd.exe gac install "C:\temp\MyAssembly\bin\MyAssembly.dll"[/td][/tr][tr][td]Empty the recycle bin in all drives.[/td][td]nircmd.exe emptybin[/td][/tr][tr][td]Answer 'Yes' to a standard Windows message-box.[/td][td]nircmd.exe dlg "" "" click yes[/td][/tr][tr][td]Wait 2 seconds, and then save the current screen to shot.png[/td][td]nircmd.exe cmdwait 2000 savescreenshot "f:\temp\shot.png"[/td][/tr][/table]

【获奖名单】

sylovanas +10

lhjoanna +50

由于单帖评分的上限而未能领完奖励积分的,可继续跟帖接受奖励。

【补充说明】

RiceFans 也参加了本次翻译活动,但其提供的下载链接已经失效,无法验证其翻译的内容,因此不予积分奖励,非常遗憾。

友情提示:如需上传附件到本论坛,强烈建议先进行压缩。

[color=Blue]【活动结束】[/color]

2009-02-25

[color=Red]【应用实例】[/color]

批处理实现定时屏幕截图 [url]http://bbs.bathome.net/thread-4131-1-2.html[/url]

批处理实现批量创建快捷方式 [url]http://bbs.bathome.net/viewthread.php?tid=4019[/url]

批处理清除剪贴板內容 [url]http://bbs.bathome.net/viewthread.php?tid=3942[/url]

批处理将剪贴板中的内容保存为文件 [url]http://bbs.bathome.net/viewthread.php?tid=2875[/url]

批处理中nircmd设置新分辨率实现重启后依然有效 [url]http://bbs.bathome.net/viewthread.php?tid=3937[/url]

sylovanas 发表于 2009-1-6 18:08

nircmd

nircmd自带变数
~n:换行 ( 包含换行和回车 LF - CR)
ex:[code]nircmd infobox "我愛~n批處理" ""

我愛
批處理[/code]~q:显示双引号 "
~t:显示tab字元
~xnn: 显示ascii字元 (16进位) ex: ~x25 = %
~~: 显示字元 ~
~$variable$: 显示传回的变数,如下:

~$clipboard$:显示剪贴簿内的资料 ( 纯文字 )
~$param.paramname$:让你自己输入显示的文字 ex:[code] nircmd infobox ~$param.1$ ~$param.2$ [/code]~$fparam.number$: 不清楚,应该是显示自己汇入的文字文件
~$sys.varname$:显示系统已定义的变数 ex
nircmd infobox "windows文件为位置在~$sys.windir$ " "文件位置"

~$nir.exefile$:显示nircmd所在文件目录
~$folder.startup$:表示为使用者启动文件夹
ex:[code]nircmd infobox "使用者\菜单\‘启动’位置为~$folder.startup[code]nircmd infobox "使用者\菜单\‘启动’位置为~$folder.startup$ " "[/code]时间不够了先这些

[[i] 本帖最后由 sylovanas 于 2009-1-6 18:14 编辑 [/i]]

lhjoanna 发表于 2009-1-8 03:50

NirCmd v2.20帮助文档中文译本

[size=3]         很好的活动啊,怎么顶贴的人不多啊。按照地址下载了NirCmd,很强大的工具。我看了英文版的帮助文档,batcher列出的只是开始的例子,还是希望大家看看下面具体的每个命令。刚开始并没打算翻译的,本是想偷个懒看看有没有人翻译出来,我直接看的。一是英文不怎么好,二来马上就考试了。不过等了几天好像还是没有,我就抽空儿花了几个晚上把帮助文档大概翻译了遍(包括下面的详细命令)。大家看之前先说明几点:
    1、E文比较好的还是直接看原版,NirCmd我第一次用,有些命令我也体会的不是很深,所以可能会产生偏差。
    2、有些命令涉及到的一些操作我还未学(包括一些术语)[/size][size=3],所以也未经测试,只是按照字面意思翻译出来了。
    3、欢迎大家都来看,一起来找出其中的错误,争取经过大家的努力,能够变成一份比较完美的中文译本。[/size]
[size=3]    4、附件中包含了NirCmd.exe、NirCmdc.exe、英文版帮助文档、我翻译的中文版帮助文档。[/size]

链接: [url]https://pan.baidu.com/s/1Ffab3WRE10Rmc6b61SS09g[/url] 提取码: p84b

wangjmh 发表于 2009-4-4 14:20

终于翻译完了

链接: [url]https://pan.baidu.com/s/19ulVBDQPqvbhInz_pTYw_A[/url] 提取码: q33e
有翻译不好的地方,请大家指教

winnipr 发表于 2009-4-15 17:06

顶一下

这东西太好了,找好久了

yzzsjc2008 发表于 2009-4-17 17:47

我下载下来了!正在看!

hai2002713 发表于 2009-4-24 08:11

好文章,找了好久,谢谢。

clm0081 发表于 2009-7-22 15:03

很好啊 用在BAT里正合适

xcwh 发表于 2009-8-12 18:38

貌似来晚了一步...

weasel 发表于 2009-8-24 00:21

非常强大的好东西,正需要,谢谢楼主

ashdisp 发表于 2009-9-24 14:25

本人常用的命令
http://hi.baidu.com/hongsedaima/blog/item/883583da287b2ad1b7fd48c8.html

strong12345 发表于 2010-3-9 16:14

回复 3楼 的帖子

請問nircmd 和 nircmdc 有什麼不同?

Spring 发表于 2010-3-9 17:03

当不带任何参数时,
nircmd 会有个对话框显示程序相关信息,并且有个 CopyToWindowsDirectory 按钮可以直接将其复制到系统目录下;
nircmdc 是纯的命令行。

yuan6319 发表于 2010-9-25 16:43

怎么不翻译win里的find或它的使用方法?

Batcher 发表于 2010-9-25 22:04

回复 14楼 的帖子

因为系统自带了帮助文档

mstsc 发表于 2011-8-13 22:35

我来啦     下载学习中

gudou 发表于 2011-9-29 03:24

没人做人举例说明教程么?

Batcher 发表于 2011-9-29 10:50

[b]回复 [url=http://bbs.bathome.net/redirect.php?goto=findpost&pid=93197&ptid=2992]17#[/url] [i]gudou[/i] [/b]


帮助文档里面自带了很多例子的

caruko 发表于 2011-9-29 11:34

[i=s] 本帖最后由 caruko 于 2011-9-29 11:36 编辑 [/i]

是一个小的命令行实用工具,允许你做一些有用的任务,没有显示任何用户界面 。通过运行简单的命令行选项NirCmd,你可以写和删除注册表项和值,写入INI文件中的值,拨号到您的Internet帐户或连接到一个VPN网络,重新启动Windows或关闭计算机,创建快捷方式到一个文件,改变文件的创建/修改日期,更改您的显示设置,关闭显示器,打开您的CD - ROM驱动器的门,和更多的... ...你可以做什么用NirCmd的例子













打开门的J:CD - ROM驱动器        nircmd.exe CDROM打开J:
关闭门的Y:CD - ROM驱动器        nircmd.exe CDROM密切Y:
增加2000台系统卷(满分为65535)        nircmd.exe changesysvolume 2000
减少5000个单位的系统卷(满分为65535)        nircmd.exe changesysvolume -5000
卷设置为最高值        nircmd.exe setsysvolume 65535
静音系统卷        nircmd.exe mutesysvolume 1
取消静音系统卷        nircmd.exe mutesysvolume 0
静音和正常状态之间切换的系统卷。        nircmd.exe mutesysvolume 2
您的桌面上创建一个快捷键,静音和正常状态之间切换的系统卷。        nircmd.exe cmdshortcut“~$ folder.desktop $”“开关量”mutesysvolume 2
关闭显示器        nircmd.exe监视,离开
启动默认的屏幕保护程序        nircmd.exe屏保
把您的计算机在“待机”模式        nircmd.exe待机
注销当前用户        nircmd.exe exitwin注销
询问您是否要重新启动,如果你回答“是”,重新启动计算机。        nircmd.exe qboxcom“你要重新启动吗?” “问题”exitwin重新启动
关闭您的计算机        nircmd.exe exitwin关机
关闭所有在computers.txt指定的电脑!        multiremote复制“C:\ TEMP \ computers.txt”exitwin关机力
拨号“我的互联网”连接        nircmd.exe RASDIAL“我的互联网”
断开“我的互联网”连接        nircmd.exe rashangup“我的互联网”
请您的Internet Explorer窗口透明的75%!(192 / 256)        nircmd.exe赢得反ititle“Internet Explorer的”192
最小化所有Internet Explorer窗口        nircmd.exe赢得分钟级“IEFrame”
关闭所有Internet Explorer窗口        nircmd.exe赢得密切类“IEFrame”
关闭您的所有浏览器窗口(我的电脑,文件夹等)        nircmd.exe赢得密切类“CabinetWClass”
隐藏所有Internet Explorer窗口        nircmd.exe赢得隐藏类“IEFrame”
显示所有Internet Explorer窗口(后,他们与前面的例子中隐藏)        nircmd.exe赢得展示类“IEFrame”
中心的所有顶层窗口        nircmd.exe赢得中心alltop
删除我的电脑窗口的标题栏。        nircmd.exe双赢式的标题“我的电脑”0x00C00000
返回我的电脑窗口的标题栏,我们在前面的例子中删除。        nircmd.exe WIN +风格的标题“我的电脑”0x00C00000
“我的电脑”窗口中设置从右到左的顺序(希伯来文和阿拉伯文)        nircmd WIN +扩展风格的标题“我的电脑”0x00400000
我的电脑“窗口中设置的所有子窗口从右到左的顺序(希伯来文和阿拉伯文)        nircmd赢得孩子的标题“我的电脑”+扩展风格所有0x00400000
在桌面上创建快捷方式,关闭所有Internet Explorer窗口        nircmd.exe cmdshortcut“~$ folder.desktop $”关闭所有IE“赢得密切类”IEFrame“
在桌面上创建快捷方式,隐藏所有Internet Explorer窗口        nircmd.exe cmdshortcut“~$ folder.desktop $”隐藏所有即“双赢隐藏类”IEFrame“
您的桌面上创建一个快捷方式显示所有Internet Explorer窗口        nircmd.exe cmdshortcut“~$ folder.desktop为”显示所有即“双赢展示类”IEFrame“
设置为最顶层窗口的Windows计算器(以上所有其他窗口)        nircmd.exe赢得settopmost标题“计算器”1
回到常规窗口(非最顶层窗口设置Windows计算器)        nircmd.exe赢得settopmost标题“计算器”0
开始菜单 - >程序 - >计算器下,创建一个快捷方式到Windows计算器        nircmd.exe快捷键“F:\ WINNT \ SYSTEM32 \ CALC.EXE”~$ folder.programs $ \计算器“,”Windows计算器“
隐藏桌面窗口        nircmd.exe赢得隐藏类PROGMAN
显示桌面窗口(躲藏在前面的例子后)        nircmd.exe赢得显示类PROGMAN
隐藏系统托盘上的启动按钮        nircmd.exe赢得子类“Shell_TrayWnd”隐藏类的“按钮”
显示系统托盘上的启动按钮        nircmd.exe赢得子类“Shell_TrayWnd”显示类“按钮”
隐藏系统托盘上的时钟        nircmd.exe运子类“Shell_TrayWnd”隐藏“TrayClockWClass类”
显示系统托盘上的时钟        nircmd.exe运子类“Shell_TrayWnd”显示类“TrayClockWClass”
杀死(终止)Internet Explorer进程的所有实例        nircmd.exe killprocess IEXPLORE.EXE
您的桌面上创建一个快捷方式,打开门的K:CD - ROM驱动器,当您运行它。        nircmd.exe cmdshortcut“~$ folder.desktop元”,“打开光驱”CDROM开放k:
NirSoft网站在您的桌面上创建一个快捷        nircmd.exe urlshortcut“[url]http://www.nirsoft.net[/url]”“~$ folder.desktop元”,“NirSoft”
添加您Favorities NirSoft网站链接文件夹下。        nircmd.exe urlshortcut“[url]http://www.nirsoft.net[/url]”“~$ folder.favorites $ \链接”NirSoft“
NirSoft网站在computers.txt列出的所有计算机的桌面上创建一个快捷方式        nircmd.exe multiremote复制“C:\ TEMP \ computers.txt”urlshortcut“[url]http://www.nirsoft.net[/url]”~$ folder.common_desktop元“,”NirSoft“
800x600x24bit颜色设置显示模式        nircmd.exe setdisplay 800 600 24
创建一个快捷方式在桌面上设置800x600x24bit颜色显示模式        nircmd.exe cmdshortcut“~$ folder.desktop $”“800x600x24”setdisplay 800 600 24
您的桌面上所有的快捷方式复制到另一个文件夹(F:\ TEMP \桌面)。        nircmd.exe execmd复制“~$ folder.desktop美元\ *. LNK”F:\ TEMP \桌面
重新启动Apache服务器(在Windows NT/2000/XP/2003)        nircmd.exe服务重新启动Apache
在您的桌面上创建一个快捷方式,重新启动Apache服务器        nircmd.exe cmdshortcut“~$ folder.desktop元”,“重新启动Apache”服务重新启动Apache
重新启动您的IIS        nircmd.exe服务重新启动W3SVC
重新启动MySQL的        nircmd.exe服务重新启动MySQL的
RegEdit中打开所需的注册表键/值        nircmd.exe REGEDIT“HKLM \ SOFTWARE \ MICROSOFT \ WINDOWS \ CURRENTVERSION”CommonFilesDir“
打开注册表项复制到剪贴板RegEdit中。        nircmd输入regedit“~$剪贴板$”
禁用屏幕保护程序        nircmd.exe regsetval SZ为“HKCU \控制面板\桌面”的“ScreenSaveActive”0
启用屏幕保护程序        nircmd.exe regsetval SZ“HKCU \控制面板\桌面”,“ScreenSaveActive”1
更改指定文件的日期/时间(创建时间和修改时间)        nircmd.exe setfiletime“C:\ TEMP \ myfile.txt的”“24-06-2003十七点57分11秒”,“22-11-2005 10时21分56秒”
您的桌面文件夹的路径复制到剪贴板        nircmd.exe剪贴板设置~$ folder.desktop美元
开始菜单文件夹的路径复制到剪贴板        nircmd.exe剪贴板设置~$ folder.start_menu $
info1.txt内容(简单的文本文件)复制到剪贴板        nircmd.exe剪贴板ReadFile的“C:\我的文件\ info1.txt”
剪贴板中的文本内容添加到info1.txt        nircmd.exe剪贴板addfile“C:\我的文件\ info1.txt”
清除剪贴板        明确nircmd.exe剪贴板
创建中指定的所有文件夹“C:\ TEMP \ folders.txt”。CRLF字符分隔的文件夹的路径名称。        nircmd.exe paramsfile“C:\ TEMP \ folders.txt”“”“”execmd MD~$ fparam.1美元
安装指定的。NET程序集在全局程序集缓存(像gacutil)        nircmd.exe GAC中安装的“C:\ TEMP \ MyAssembly的\ BIN \ MyAssembly.dll程序集”
清空回收站中的所有驱动器。        nircmd.exe emptybin
回答“是”一个标准的Windows消息框。        nircmd.exe DLG“”“”点击yes
等待2秒,然后保存当前屏幕shot.png        nircmd.exe cmdwait 2000 savescreenshot“F:\ TEMP \ shot.png”

caruko 发表于 2011-9-29 11:37

=.=来自谷歌浏览器的翻译。。。

Batcher 发表于 2011-9-29 11:40

[b]回复 [url=http://bbs.bathome.net/redirect.php?goto=findpost&pid=93223&ptid=2992]20#[/url] [i]caruko[/i] [/b]


Google的翻译容易误人子弟[img]http://bbs.bathome.net/images/smilies/default/lol.gif[/img]

roosevelt122007 发表于 2015-3-25 18:40

请问下, nircmd的返回值是多少啊~
为什么我试了 win 命令, 不管窗口在不在, 执行没有,返回值都是1
这个要怎么调用啊?
有会的大神帮忙下啊
感谢!

sheyulian 发表于 2015-3-28 13:51

学习学习......

stipe 发表于 2015-7-31 15:44

看了就顶,有心了,感谢!

post927 发表于 2016-2-29 13:04

支持楼主的分享,大大

pclygb1359 发表于 2020-1-12 12:30

谢谢楼主分享,拿走了,希望有所帮助

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.