Win之NirCmd:NirCmd的简介、安装、使用方法之详细攻略


烂漫笑咖啡
烂漫笑咖啡 2022-09-19 17:27:30 50011
分类专栏: 资讯

Win之NirCmd:NirCmd的简介、安装、使用方法之详细攻略

目录

NirCmd的简介

NirCmd的安装

NirCmd的使用方法


NirCmd的简介

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

NirCmd的安装

Download NirLauncher Package

NirCmd的使用方法

例如:nircmd setdefaultsounddevice

弹出盘符为J的光驱    

NirCmd.exe cdrom open j:

弹入盘符为Y的光驱

nircmd.exe cdrom close 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$" "Switch Volume" mutesysvolume 2

关闭显示器

nircmd.exe monitor off

启动默认屏保

nircmd.exe screensaver

进入待机状态

nircmd.exe standby

注销当前用户

nircmd.exe exitwin logoff

弹出对话框,询问是否重启。选择是则重启电脑

nircmd.exe qboxcom "Do you want to reboot?" "question" exitwin reboot

关闭computers.txt中指定的所有计算机

multiremote copy "c:\temp\computers.txt" exitwin poweroff force

拨号连接到"My Internet"

nircmd.exe rashangup "My Internet"

设置IE窗口为75%透明度(192/256)

nircmd.exe win trans ititle "internet explorer" 192

最小化所有的IE窗口

nircmd.exe win min class "IEFrame"

关闭所有的IE窗口

nircmd.exe win close class "IEFrame"

关闭所有的资源管理器窗口(我的电脑、文件夹等)

nircmd.exe win close class "CabinetWClass"

隐藏所有的IE窗口

nircmd.exe win hide class "IEFrame"

显示所有的IE窗口(在用上面命令隐藏后)

nircmd.exe win show class "IEFrame"

把所有的顶级窗口居中

nircmd.exe win center alltop

去掉我的电脑窗口的标题栏

nircmd.exe win -style title "my computer" 0x00C0000

恢复我的电脑窗口的标题栏(当用上面命令去除后)

nircmd.exe win +style title "my computer" 0x00C0000

设置我的电脑窗口为从右至左的顺序(适用于希伯来语和阿拉伯语)

nircmd.exe win +exstyle title "my computer" 0x00400000

设置我的电脑窗口的所有子窗口为从右至左的顺序(适用同上)

nircmd.exe win child title "my computer" +exstyle all 0x00400000

在桌面创建可以关闭所有IE窗口的快捷方式

nircmd.exe cmdshortcut " "~$folder.desktop$ "Close All IE" win close class "IEFrame"

在桌面创建可以隐藏所有IE窗口的快捷方式

nircmd.exe cmdshortcut " "~$folder.desktop$ "Hide All IE" win hide class "IEFrame"

在桌面创建可以再次显示所有IE窗口的快捷方式

nircmd.exe cmdshortcut " "~$folder.desktop$ "Show All IE" win show class "IEFrame"

把calculator窗口设置为最上层窗口(在其他窗口之上)

nircmd.exe win settopmost title "Calculator" 1

恢复calculator窗口为原始窗口状态(不处于最上层)

nircmd.exe win settopmost title "Calculator" 0

创建calc.exe快捷方式到开始菜单->程序->Calculators

nircmd.exe shortcut "f:\winnt\system32\calc.exe" "~$folder.programs$\Calculators" "Windows Calculator"

隐藏桌面所有图标

nircmd.exe win hide class progman

显示桌面所有图标(用以上命令隐藏过后)

nircmd.exe win show class progman

隐藏系统开始按钮

nircmd.exe win child class "Shell_TrayWnd" hide class "button"

显示系统开始按钮

nircmd.exe win child class "Shell_TrayWnd" show class "button"

隐藏系统时间

nircmd.exe win child class "Shell_TrayWnd" hide class "TrayClockWClass"

显示系统时间

nircmd.exe win child class "Shell_TrayWnd" show class "TrayClockWClass"

终止所有IE实例

nircmd.exe killprocess iexplore.exe

创建桌面快捷方式,运行即可弹出光驱(K盘)

nircmd.exe cmdshortcut "~$folder.desktop$" "Open CDROM" cdrom open k:

将nirsoft网址创建到桌面快捷方式

nircmd.exe urlshortcut "http://www.nirsoft.net" "~$folder.desktop$" "NirSoft"

添加nirsoft网址到收藏夹\链接下

nircmd.exe urlshortcut "http://www.nirsoft.net" "~$folder.favorites$\Links" "NirSoft"

将nirsoft网址快捷方式创建到computers.txt中列出的所有计算机的桌面

nircmd.exe multiremote copy "c:\temp\computers.txt" urlshortcut "http://www.nirsoft.net" "~$folder.common_desktop$" "NirSoft"

设置显示模式为800X600,24位色

nircmd.exe setdisplay 800 600 24

将设置显示模式为800X600,24位色命令创建为桌面快捷方式

nircmd.exe cmdshortcut "~$folder.desktop$" "800x600x24" setdisplay 800 600 24

复制所有桌面快捷方式到其他文件夹(f:\temp\desktop)

nircmd.exe execmd copy "~$folder.desktop$\*.lnk" f:\temp\desktop

重启你的Apache server服务器(windows NT/2000/XP/2003)

nircmd.exe service restart apache

将重启Apache server服务器命令创建为桌面快捷方式

nircmd.exe cmdshortcut "~$folder.desktop$" "Restart Apache" service restart apache

重启IIS(互联网信息服务)

nircmd.exe service restart w3svc

重启MySql

nircmd.exe service restart MySql

打开指定注册表项/值

nircmd.exe regedit "HKLM\Software\Microsoft\Windows\CurrentVersion" "CommonFilesDir"

打开你在注册表编辑器中复制到剪切板的注册表项

nircmd regedit "~$clipboard$"

禁用屏保

nircmd.exe regsetval sz "HKCU\control panel\desktop" "ScreenSaveActive" 0

取消禁用屏保

nircmd.exe regsetval sz "HKCU\control panel\desktop" "ScreenSaveActive" 1

改变指定文件的日期/时间(创建时间和修改时间)

nircmd.exe setfiletime "c:\temp\myfile.txt" "24-06-2003 17:57:11" "22-11-2005 10:21:56"

复制桌面所在路径到剪切板

nircmd.exe clipboard set ~$folder.desktop$

复制开始菜单文件夹路径到剪切板

nircmd.exe clipboard set ~$folder.start_menu$

复制文本info1.txt中的内容到剪切板

nircmd.exe clipboard readfile "c:\My Files\info1.txt"

将剪切板中内容添加到文本info1.txt中

nircmd.exe clipboard addfile "c:\My Files\info1.txt"

清空剪切板

nircmd.exe clipboard clear

创建所有在"c:\temp\folders.txt"中指定的文件夹,文件夹路径名用回车符隔开

nircmd.exe paramsfile "c:\temp\folders.txt" "" "" execmd md ~$fparam.1$

安装所有在全局程序集缓存(GAC)中指定的.NET程序集

nircmd.exe gac install "C:\temp\MyAssembly\bin\MyAssembly.dll"

清空所有磁盘上的回收站

nircmd.exe emptybin

对一个标准的Windows信息框回复确认

nircmd.exe dlg "" "" click yes

延迟2秒钟,然后保存当前屏幕截图到shot.png

nircmd.exe cmdwait 2000 savescreenshot "f:\temp\shot.png"

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

相关文章
NirCmd介绍
命令行工具(nircmd.exe)的使用方法

网站声明:如果转载,请联系本站管理员。否则一切后果自行承担。

本文链接:https://www.xckfsq.com/news/show.html?id=3851
赞同 0
评论 0 条
烂漫笑咖啡L0
粉丝 0 发表 5 + 关注 私信
上周热门
如何使用 StarRocks 管理和优化数据湖中的数据?  2951
【软件正版化】软件正版化工作要点  2872
统信UOS试玩黑神话:悟空  2833
信刻光盘安全隔离与信息交换系统  2728
镜舟科技与中启乘数科技达成战略合作,共筑数据服务新生态  1261
grub引导程序无法找到指定设备和分区  1226
华为全联接大会2024丨软通动力分论坛精彩议程抢先看!  165
2024海洋能源产业融合发展论坛暨博览会同期活动-海洋能源与数字化智能化论坛成功举办  163
点击报名 | 京东2025校招进校行程预告  163
华为纯血鸿蒙正式版9月底见!但Mate 70的内情还得接着挖...  159
本周热议
我的信创开放社区兼职赚钱历程 40
今天你签到了吗? 27
如何玩转信创开放社区—从小白进阶到专家 15
信创开放社区邀请他人注册的具体步骤如下 15
方德桌面操作系统 14
用抖音玩法闯信创开放社区——用平台宣传企业产品服务 13
我有15积分有什么用? 13
如何让你先人一步获得悬赏问题信息?(创作者必看) 12
2024中国信创产业发展大会暨中国信息科技创新与应用博览会 9
中央国家机关政府采购中心:应当将CPU、操作系统符合安全可靠测评要求纳入采购需求 8

加入交流群

请使用微信扫一扫!