Board logo

标题: [工具合集] 系统综合类工具: cax.exe [打印本页]

作者: pusofalse    时间: 2008-11-5 23:54     标题: 系统综合类工具: cax.exe

http://bcn.bathome.net/s/tool/index.html?key=cax
  1. Comandiux: a command line Angeliux ?treeumph Y2k7.
  2. On command line type command and its parameters eg: /wnc Notepad "Untitled - Notepad"
  3. General purpose:
  4. /???        - ask, next parameter is text followed by another commands, if answer is NO, program ends
  5. /BEEP        - PC speaker beep
  6. /BEPL        - play windows default beep
  7. /WAPL        - play wav file
  8. /MVOLUME:0-65535        - set master volume (mixer 0) {use "/MVOLUME:R-10000" do decrease by 10000}
  9. /MVOLUME1:0-65535        - set master volume on mixer 1
  10. /MVOLUME2:0-65535        - set master volume on mixer 2
  11. /MVOLUME3:0-65535        - set master volume on mixer 3
  12. /MVOLUME4:0-65535        - set master volume on mixer 4
  13. /MIXERS        - list Mixer devices, volume and name
  14. /SAVER        - Run Screen saver
  15. /ENSAVER        - Enable Screen saver
  16. /DISSAVER        - Disable Screen saver
  17. /SHOWDESK        - Show Desktop
  18. /RESTDESK        - Restore desktop windows
  19. /NMLO        - Set Num Lock On (only on WinNT / Win2k / XP)
  20. /NOW file text        - Write date, time and text to file ("-" - means no text)
  21. /MOFF!        - Turn Monitor OFF. Use Carefully!
  22. /MON!        - Turn Monitor ON
  23. /HOTKEY AS:122        - Wait for hotkey ALT+SHIFT+F11 and continue with next parameter (Alt, Control, Shift, Win_key):Virtual_key_code
  24. /UNTIL 22:30        - Wait until time specified in 24 hour format, continues by next parameter
  25. /VWAIT:120 text        - Show Wait window with text, next command follows
  26. /WAIT:5        - Wait 5 seconds, unvisible
  27. /CYCLE:20        - repeat action from next parameter, timeout Seconds/10
  28.           not working with file operations (copy, delete, move, run, execute)
  29. /REPEAT:2        - repeat commands from parameter 2 on command line (/vwait:4 par1 /vwait:6 par4 /repeat:3 - repeat commands from /vwait:6 including)
  30.           use Cax.exe /winclose ".Comandiux*" to stop this loop
  31. /MEMFREE:10        - free 10% or RAM
  32. /.MANIFEST        - create Comandiux .Manifest file for Windows XP
  33. /REGISTEREXE        - register Comandiux program in registry path
  34.           HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths\Cax.exe
  35.           HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Cax.exe
  36. Services / drivers
  37. /SVC~I        - install Comandiux service, manual start
  38. /SVC~IA        - install Comandiux service, automatic start
  39. /SVC~R        - run as service
  40. /SVC~U        - uninstall Comandiux service
  41. /SVC~NAME:name        - service name to install/uninstall
  42. /SVC~DISP:name        - service display name to install/uninstall
  43. /SVC~PARAM        - parameters used to start service (all strings after this parameter are parsed as service parameters)
  44.         /SVC~I /SVC~NAME:MyService /SVC~DISP:"My first service" /SVC~PARAM /rumw program.exe parameter_one parameter_two
  45.         /SVC~U /SVC~NAME:MyService
  46.    in registry \\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MyService, you can change other service parameters
  47. /SVCLIST        - list all known services and drivers
  48. /SVCSVCLIST        - list all services
  49. /SVCDRVLIST        - list all drivers
  50. /SVCSTOP name        - stop service
  51. /SVCSTART name        - start service
  52. Devices
  53. /DEVLIST        - list all installed devices on machine
  54. /DEVEJIN        - Eject device by InstanceID
  55. /DEVEJDN        - Eject by DeviceName
  56. /DEVEJDI        - Eject by DeviceID
  57. /DEVEJDP        - Eject by DeviceParent
  58. /DEVDSIN        - Disable device by InstanceID
  59. /DEVDSDN        - Disable by DeviceName
  60. /DEVDSDI        - Disable by DeviceID
  61. /DEVDSDP        - Disable by DeviceParent
  62. /DEVENIN        - Enable device by InstanceID
  63. /DEVENDN        - Enable by DeviceName
  64. /DEVENDI        - Enable by DeviceID      
  65. /DEVENDP        - Enable by DeviceParent
  66. Windows / machine controlling:
  67. /DARD        - Disconnect this remote session, with ask
  68. /DRD        - Disconnect this remote session
  69. /DWH        - Hibernate computer
  70. /DAWH        - Hibernate with ask
  71. /DWC        - Close Windows, Power off
  72. /DAWC        - Close windows with ask, Power off
  73. /LOCKW        - Lock Workstation
  74. /DWL        - Log off
  75. /DAWL        - Log off with ask
  76. /DFL        - Force Log Off
  77. /DAFL        - Force Log Off with ask
  78. /DWR        - Reboot computer
  79. /DAWR        - Reboot computer with ask
  80. /DFR        - Force reboot
  81. /DAFR        - Force reboot with ask
  82. /DWS        - Suspend computer
  83. /DAWS        - Suspend with ask
  84. /DWNP        - ShutDown, No Power Off
  85. /DHFS        - ShutDown Force If Hung, Power off
  86. /DAHFS        - ShutDown Force If Hung with Ask, Power off
  87. /DAFS        - Force ShutDown with ask, Power off
  88. /DFS        - Force ShutDown, Power off
  89. /DESR        - Emergency force reboot, no ask!
  90. /DESS        - Emergency force ShutDown, Power off, no ask!
  91. /SHUTDOWNINIT        - initiate system shutdown: /shutdowninit machine timeout message forceY/N rebootY/N
  92.         /shutdowninit SERVER 230 "SERVER will reboot in 230 seconds" N Y
  93. /SHUTDOWNABORT        - abort system shutdown: /shutdownabort machine ("-" means local machine)
  94. Message boxes (result are returned as errorlevel, refer to MSDN MessageBox function):
  95. /MSG        - Messagebox "OK"
  96. /MSC        - Messagebox "OK Cancel"
  97. /MSR        - Messagebox "Abort Retry Ignore"
  98. /MSN        - Messagebox "Yes No Cancel"
  99. /MSY        - Messagebox "Yes No"
  100. /MSRC        - Messagebox "Retry Cancel"
  101. /MSIG        - Messagebox "OK", Comandiux continues with next parameter, otherwise ends
  102. /MSIC        - Messagebox "OK Cancel", if "OK" Comandiux continues with next parameter, otherwise ends
  103. /MSIY        - Messagebox "Yes No", if "YES" Comandiux continues with next parameter, otherwise ends
  104. (IDOK 1, IDCANCEL 2, IDABORT 3, IDRETRY 4, IDIGNORE 5, IDYES 6, IDNO 7, IDCLOSE 8, IDHELP 9, IDTRYAGAIN 10, IDCONTINUE 11)
  105. Message window:
  106. /MSWT        - Show text in message window
  107. /MSWC        - Close message window
  108. /MSWU        - Add text to message window
  109. /TELL 20 text        - Shows small window in screen center for seconds/10
  110. /TELT        - same as above plus show countdown
  111. On Screen display OSD:
  112. /OSDTEXT 50 text        - Shows lime osd text bottom on screen (timeout seconds/10 ), 0 means wait forever, /osdtext 100 "Lime Message"
  113. /OSDRTF  50 Rich        - shows Rich formated text, /osdrtf 100 "{\rtf1\ansi\deff0{\fonttbl{\f0\fprq2 Verdana;}}{\colortbl ;\red0\green255\blue0;}{\uc1\pard\qc\cf1\b\f0\fs72 TEXT to SHOW \cf0\b0\par}"
  114. /OSDFILE 50 file        - shows text or rtf file content as OSD message, when create RTF, align to center
  115. /OSDTOP 20        - Top position of OSD, 5-32000
  116. /OSDRECYCLE        - reuse OSD window, must be specified before any other /OSD... "/OSDRECYCLE /osdtext 10 %!clock!% /repeat:2"
  117. /CLASSCLOSE ~treeumphOSD        - remove OSD manually
  118. Aplication / windows:
  119. /CAXLIST        - list all running copies of Comandiux with their command lines
  120. /WNC        - Close window (class name or "-") {window name or "-"} or use #000234 (#$004ab for hexa) as window hadle number, window name as "-" must be in this case
  121. /WNT        - Destroy window (class name or "-") {window name or "-"} or number #...
  122. /WNH        - Hide window ...
  123. /WNS        - Show window ...
  124. /WND        - Disable window ...
  125. /WNE        - Enable window ...
  126. /WNM        - Minimize window ...
  127. /WNX        - Maximize window ...
  128. /WNR        - Restore window ...
  129. /WNN        - Show window normal ...
  130. /WNZT        - Set window topmost (stay on top) ...
  131. /WNZN        - Set window not topmost ...
  132. /WNZA        - Activate window (bring to front, set focus) ...
  133. /WNZB        - Send window to back (bottom) ...
  134. /WINLIST        - show applications windows, (Unicode Enabled disabled Visible hidden mInimized Maximized Parent child)
  135. /WINLISTA        - show applications windows including windows without caption / text
  136. /WINPRIO1-6        - set process  by window priority /winprio3 Calculator (1-6 = idle, below, normal abowe, high, realtime){2,4 only on win2k, XP}
  137. /WINTRANSP         - set window transparency (0=transparent, 255 = opaque) /wintransp 180 Calc*
  138. /WINTRCL        - set window color transparent (colorvalue, prefix $0 means HEX) /wintransp $0c0c0c0 Calculator
  139. /WINCLOSE        - close all windows title matches parameter /winclose "Untitled - Notepad"
  140. /WINDESTROY        - destroy all windows title matches parameter /windestroy Untitle*
  141. /CLASSPRIO1-6        - set process  by window priority /classprio3 SciCalc (1-6 = idle, below, normal abowe, high, realtime){2,4 only on win2k, XP}
  142. /CLASSTRANSP         - set window transparency by class name (0=transparent, 255 = opaque) /classtransp 255 SciCalc
  143. /CLASSTRCL        - set window color transparent by class (colorvalue, prefix $0 means HEX) /wintransp $0c0c0c0 SciCalc
  144. /CLASSCLOSE        - close all windows class matches parameter /classclose *pad
  145. /CLASSDESTROY        - close all windows class matches parameter /classdestroy winh*
  146. /WINMSGSEND        - Send message to window and shows result(WindowName, Message, Wparam, Lparam) /WinMsgSend Calculator 16 0 0
  147. /WINMSGPOST        - Post message to window (WindowName, Message, Wparam, Lparam) /WinMsgPost Calculator 16 0 0
  148. /CLASSMSGSEND        - Send message to window and shows result(WindowClass, Message, Wparam, Lparam) /ClassMsgSend SciCalc 16 0 0
  149. /CLASSMSGPOST        - Post message to window (WindowClass, Message, Wparam, Lparam) /ClassMsgPost SciCalc 16 0 0
  150. Program / process:
  151. /RUN        - Run apl normal
  152. /RUM        - Run apl minimized
  153. /RUH        - Run apl hidden
  154. /RUX        - Run apl maximized
  155. /RU?W        - run as previous, but wait for program ends (/runw, /rumw, ...)
  156. /VERB:         - verb for ShellExecute, specify before "/RUN", (cax.exe /verb:print /run "c:\myfile.txt"), default is 'OPEN'
  157. /PRIO:1-6        - adjust process priority for ShellExecute (/prio:3 /run calc.exe)
  158. /ASUSER        - run as an user, (specify: user_name domain password program) eg.: (cax.exe /asuser peter - - notepad.exe c:\logfile.txt), Comandiux ends after and returns Errorlevel value
  159. /PRCLIST        - show all running processes
  160. /PRCMODLIST        - show all running processes and their modules
  161. /PRCSCAN        - scan for all processes
  162. /PRCPRIO1-6        - set process priority /prcprio3 calc.exe (1-6 = idle, below, normal abowe, high, realtime){2,4 only on win2k, XP}
  163. /KILLPRC file        - kill first process matches parameter /killprc notepad.exe
  164. /KILLALL         - kill all processes matches parameter /killall winh*
  165. /KILLLAST        - kill last process matches parameter /killlast *pad
  166. /KILLID id        - kill by process ID /killid 00f3
  167. /KILLUSER name        - kill all processes by user name /killuser Administ*
  168. File, disk:
  169. /PROP        - Display properties of object
  170. /DDEL        - Delete file or dir (to Recycle Bin)
  171. /DEL        - Delete file or dir with ask (to Recycle Bin)
  172. /REM        - Remove file or dir with ask
  173. /DREM        - Remove file or dir
  174. /CPY        - Copy file or directory, (/CPY source target)
  175. /CPA        - Copy with ask
  176. /CPD        - Copy directly (no ask for overwrite, etc..)
  177. /CPH        - Copy hidden
  178. /MVE        - Move file or directory
  179. /MVA        - Move with ask
  180. /MVD        - Move directly (no ask for overwrite, etc..)
  181. /MVH        - Move hidden
  182. /RNM        - Rename file or directory
  183. /RNA        - Rename with ask
  184. /RND        - Rename directly (no ask for overwrite, etc..)
  185. /RNH        - Rename hidden
  186. /NETA        - Add network connection eg.: \\server\disk1 s:
  187. /NETD        - Delete network connection s:
  188. /REPLACE        - Replace file on next reboot, user must be in an administrator's group (/REPLACE sourcefile new_name)
  189. /HARDLINK        - Creates hard link, both files must be on same drive (/HARDLINK new_file_name existing_file)
  190. /DSKEJ:x        - Eject drive X:
  191. /DSKFEJ:x        - Force Eject drive X:
  192. /DSKCL:y        - Close drive Y:
  193. /DSKFCL:y        - Force Close drive Y:
  194. /DSKLCK:s        - lock removal of drive S:
  195. /DSKUNL:s        - unlock removal of drive S:
  196. /WAITDIRC        - wait for directory change
  197. /WAITDIRSC        - wait for directory and subdirs change
  198. /DRVLIST        - List all drives in system, with network user name
  199. /GETNETUSER        - get user name for network resource (\\192.168.0.1\ipc$, \\computer\share)
  200. /MD5FILE        - calculate MD5 hash and write output to .md5 file (cax.exe /MD5FILE file.iso [ouputdir or -])
  201. /SHA1FILE        - calculate SHA1 hash and write output to .sha1 file (cax.exe /SHA1FILE file.iso [ouputdir or -])
  202. /FILEOF_NOSECATTR        - for copy, move or rename operation add flag: FOF_NOCOPYSECURITYATTRIBS
  203. /FILEOF_NOCONELEM        - for copy, move or rename operation add flag: FOF_NO_CONNECTED_ELEMENTS
  204. /FILEOF_NORECURSION        - for copy, move or rename operation add flag: FOF_NORECURSION
  205. /FILEOF_FILESONLY        - for copy, move or rename operation add flag: FOF_FILESONLY
  206. ********************************************************************************
  207. Variables, use on command line, Windows variables works also
  208. %!TICK!%        - decimal value from gettickcount
  209. %!HTICK!%        - hexadecimal value from gettickcount
  210. %!CLOCK!%        - time HH:MM:SS
  211. %!TIME!%        - time HH-MM-SS
  212. %!T100!%        - time with 1/100 of second
  213. %!HOUR!%        - hour
  214. %!MIN!%        - minute
  215. %!SEC!%        - seconds
  216. %!DATE!%        - date YYYY-MM-DD
  217. %!YEAR!%        - year
  218. %!MON!%        - month
  219. %!DAY!%        - day
  220. %!DAYN!%        - name of day
  221. %!MONN!%        - name of month
  222. %!FMEM!%        - free memory in MB
  223. %!UNAME!%        - user name
  224. %!CNAME!%        - computer name
  225. %!IPADS!%        - IP adresses
  226. %!CDRIVE!%        - current drive
  227. %!CDIR!%        - current drive and directory
  228. %!SDRIVE!%        - starting drive of Comandiux
  229. %!SDIR!%        - starting drive and directory of Comandiux
  230. %!FILE:fname!%        - first line from file "fname" (cax.exe /msg "%!file:D:\temp\My text file.txt!%")
  231. ********************************************************************************
  232. /VERBOSEN        - don't display any error
  233. /VERBOSE0        - normal level of error reports (default)
  234. /VERBOSE1        - show error reports
  235. "-" means Empty parameter in some case
  236. "\n" new line (CRLF)
  237. "\t" TAB
  238. use > or >> to redirect some outputs to file, >! and >>! writes time stamp to file
  239. cax.exe /devlist ^>c:\cax_device_dump.txt
  240. Escape character "^" must be used in CMD window or batch files, otherwise not.
  241. For append use "^>^>"!
  242. remove Hacker Defender service: "cax.exe /svc~u /svc~name:HackerDefender100"
  243. close all copies of Comandiux: "cax.exe /CLASSCLOSE .!Comandiux~main~window"
  244. HWND_BROADCAST = $FFFF
  245. *******************************************************************************
  246. Key combinations in main window
  247. [Ctrl + F11]   - show messages
  248. [Alt + F]      - find in help window (type text to command line)
  249. [Alt + N]      - find next
  250. Any comment / question? Contact author!
  251. Email:                Comandiux@scot.sk
  252. Comandiux home:                http://comandiux.scot.sk
  253. For gui version visit Angeliux home:        http://angeliux.scot.sk
  254. Some features are not working on 9x architecture.
  255. Warning! We are not guarantee any damage caused this program!
复制代码
  1. cax.exe /osdtext 50 "BBS.bathome.net"
  2. :: 屏幕输出BBS.bathome.net, 延时5s.
  3. cax.exe /osdfile 100 "test.x"
  4. :: 屏幕输出test.x中的内容, 延时10s.
  5. cax.exe /until 22:20 /osdtext 10 %!clock!% /repeat:3
  6. :: 22:20开始, 实时输出系统时间,%!clock!%是cax的变量,不必事先定义,此处需注意在bat中的使用。
  7. /repeat:3 重复执行第3个参数以后的命令,包括第3个参数,即:/osdtext 10 %!clock!% /repeat:3。
  8. 如果是/repeat:2,则会出错,因为第二个参数是22:20,它并不是cax.exe的内置参数。
  9. cax.exe /svclist
  10. ::通过对话框形式显示服务列表。
  11. cax.exe /svclist ^>svclist.x
  12. :: 将服务列表输出到svclist.x,注意转义字符^。
  13. cax.exe /run notepad.exe
  14. ::运行记事本
  15. cax.exe /rum notepad.exe
  16. :: 运行记事本并最小化,最大化则是/rux
  17. cax.exe /md5file file
  18. :: 计算file的md5值,会在当前目录生成一个file.md5的文件,存储相关信息。
  19. cax.exe /md5file file c:\
  20. :: 将file.md5存储到c:\
  21. cax.exe /killprc notepad.exe
  22. :: 结束匹配到的第一个notepad.exe进程
  23. cax.exe /killall note*
  24. :: 结束匹配到的所有note*进程。
  25. cax.exe /prop c:\
  26. :: 打开c:\属性对话框
复制代码

作者: jellyhk    时间: 2008-11-6 00:38

先站个沙发了!
我就先下了
作者: 心愿怕人    时间: 2009-2-2 13:59

超棒,谢谢啦!慢慢学习!再接再厉
作者: ynkm0871    时间: 2009-6-13 11:46

这个小工具很强大的嘛,感谢并支持!
作者: vlem    时间: 2009-7-30 15:43

不是一般的强
用起来一定很。。。。
作者: gzxzw    时间: 2009-10-27 00:50

这个小工具很好,只是不是纯命令行处理。都是要在窗口中实现。
作者: laihaibin08    时间: 2010-6-9 13:58

超棒,谢谢啦!慢慢学习!再接再厉
作者: plo2553642    时间: 2010-12-15 08:53

xiexie!!!!!!!!!
作者: ywq111    时间: 2011-1-18 21:06

很强大,收藏了。多谢。
作者: 牟头人    时间: 2011-6-17 09:52

新手不知道怎么用哦。。。
作者: goldensjq    时间: 2011-6-18 21:04

这么强大的工具,下来用看看
作者: garyng    时间: 2011-8-9 18:22

楼主好厉害啊~
竟然有那么多参数~
强悍~
作者: clonecd    时间: 2012-5-20 00:04

文件虽小,但功能超强,谢谢。
作者: LIBatch    时间: 2016-6-17 18:42

非常强大的工具,下载收藏咯!
作者: 101    时间: 2022-12-27 10:21

感谢分享~~~~~




欢迎光临 批处理之家 (http://bathome.net./) Powered by Discuz! 7.2