windows中Crontab的使用

一.jdk的安装

安装地址ttps://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

二 .下载nircmd

点我下载

运行

nircmd.exe

copy....

然后去C:\Windows

就能找到nircmd.exe

右键创建快捷方式找到nircmd.exe 后面加上XXXX命令

常用命令

弹出盘符为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快捷方式到开始菜单->程序->Calculatorsnircmd.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
重启MySqlnircmd.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.pngnircmd.exe cmdwait 2000 savescreenshot “f:\temp\shot.png”

三.下载git项目代码

https://github.com/qiu8310/crontab

    原文作者:小小咸鱼YwY
    原文地址: https://www.cnblogs.com/pythonywy/p/11747896.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞