China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-25 07:21
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Third - party command - line tool collection post [Being added] DigestII View 83,044 Replies 91
Floor 46 Posted 2008-10-30 18:18 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
pv 强大的进程操作工具
http://www.teamcti.com/pview/prcview.htm

pv displays information about the running processes.
pv v 5.2.2.7, Copyright (c) Igor Nys, 2000-2006.

Usage: pv -... <ARGUMENT>... -

Modes:
-s --summary show usage for the specified MODULE
-h,-? --help display this help information

Actions:
-k --kill kill process
-a --activate brings process main window in the foreground
-c --close close (send WM_CLOSE) to the PROCESS
-p --priority set priority to "Normal", "Idle", "High", "Real Time"
"Below Normal" and "Above Normal" only on W2K or higher

Output Options:
-e, --extend show additional information if available
-q,--quiet supress headers and produce a tab-separated list
-b --bare show process ID only ()
-o<format> --output control output using the format string (see below)

Input Options:
-f, --force never prompt
-i, --id use process ID instead of the PROCESS name

Filters:
-l --long include processes with command line matching mask
-w --window show processes with visible windows matching mask,
-e includes in search also invisible windows
-u --usage show processes using modules that matches mask
-y --user show processes that run under specified user account
-t --tree display process tree starting starting from the root

Extra Information Options:
-g --getenv get startup environment for the PROCESS
-m --module show modules used by specified PROCESS

Execution Options:
-d --delay delay time in milliseconds before executing command
-r --repeat repeat command in a cycle, while (%ERRORLEVEL% > err)
-n --number %ERRORLEVEL% = negated number of matched processes
-x --exit wait for the process completion (exit)
'a' flag waits for all processes, -d sets time-out
-@ read arguments from specified file or from
standard input after processing the command line

Arguments can contain '*' and '?' wildcards.

Use return code (%ERRORLEVEL%) in batch files:
0 - process found (negated number of processes if -n is specified)
1 - empty result set, 2 - programm error

Format string can use the following placeholders to control the output
%a affinity, %d creation time, %c % cpu
%f full path, %e elapsed cpu time, %i process id
%l command line, %n image name, %m memory (K)
%p priority, %r parent id, %s signature
%t thread count, %u user name, %v version
Specify an optional performance data collecting time in milliseconds after the %c switch, default is 500ms.
Examples:
pv myprocess.exe get process ID for myprocess.exe.
pv -e get extended list of running processes.
pv -k sleep* kill all processes starting with "sleep"
pv -m -e explorer.exe get extended information about explorer's modules
pv -u oleaut*.dll list of all processes that use matching dll
pv -ph w*.exe set priority to hight for all matching processes
pv explorer.exe -l"*/S" looks for explorer process with /S switch
pv -r0 -d2000 calc.exe "2>nul"
checks every 2 seconds if calc.exe is running
pv --user:SYSTEM shows processes running under system account
pv -o"%i\t%e\t%c2000%%\t%m(K)\t%n" pv.exe sqlservr.exe
shows memory and CPU information collected for 2 sec.


[ Last edited by tireless on 2008-12-27 at 14:03 ]
Floor 47 Posted 2008-10-30 19:26 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
cmdline: Displays the command-line parameters of processes (16k)
http://www.diamondcs.com.au/consoletools/cmdline.php

CmdLine - DiamondCS Freeware Console Tools (www.diamondcs.com.au)
---
PURPOSE: Displays the commandline parameters associated with processes.
USAGE: cmdline
FLAGS: (none) Displays all processes
-pid:<pid> Displays just one process
-u Uses Unicode instead of ANSI
NOTES: This uses an undocumented method and only works under Windows NT/2000/X
P.


C:\>cmdline.exe
CmdLine - DiamondCS Freeware Console Tools (www.diamondcs.com.au)
---
Found 24 processes.

\SystemRoot\System32\smss.exe
(kernel32.dll not found in this process)

\??\C:\WINDOWS\system32\csrss.exe
C:\WINDOWS\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,3072
,512 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserS
erverDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileCo
ntrol=Off MaxRequestThreads=16


\??\C:\WINDOWS\system32\winlogon.exe
winlogon.exe

C:\WINDOWS\system32\services.exe
C:\WINDOWS\system32\services.exe

C:\WINDOWS\system32\lsass.exe
C:\WINDOWS\system32\lsass.exe

C:\WINDOWS\system32\svchost.exe
C:\WINDOWS\system32\svchost -k DcomLaunch

C:\WINDOWS\system32\svchost.exe
C:\WINDOWS\system32\svchost -k rpcss

C:\WINDOWS\System32\svchost.exe
C:\WINDOWS\System32\svchost.exe -k netsvcs

C:\WINDOWS\system32\svchost.exe
C:\WINDOWS\system32\svchost.exe -k NetworkService

C:\WINDOWS\system32\svchost.exe
C:\WINDOWS\system32\svchost.exe -k LocalService

C:\WINDOWS\Explorer.exe
C:\WINDOWS\Explorer.exe

D:\Program Files\HoeKey\hoekey.exe
"D:\Program Files\HoeKey

E:\Program Files\Opera\opera.exe
"E:\Program Files\Opera\opera.exe"

C:\WINDOWS\System32\alg.exe
C:\WINDOWS\System32\alg.exe

D:\Program Files\prcmgr\PrcMgr.exe
"D:\Program Files\prcmgr\PrcMgr.exe" taskmgr.exe

E:\Program Files\Kingsoft\PowerWord 2008 Beta\XDict.exe
"E:\Program Files\Kingsoft\PowerWord 2008 Beta\XDict.exe"

C:\WINDOWS\system32\conime.exe
C:\WINDOWS\system32\conime.exe

D:\Program Files\StrokeIt\strokeit.exe
"D:\Program Files\StrokeIt\strokeit.exe"

C:\WINDOWS\system32\cmd.exe
"C:\WINDOWS\system32\cmd.exe"

D:\commandline tools\cmdutils\Context.exe
Context.exe /text "E:\Program Files\Opera\opera.exe"

C:\WINDOWS\system32\cmd.exe
"cmd.exe" /k "D:\commandline tools\cmdline.exe" /?



[ Last edited by tireless on 2008-12-27 at 14:03 ]
Floor 48 Posted 2008-10-30 19:26 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
dhfile.exe: Prevent Deletion of File (File Locking)
http://hi.baidu.com/fengze/blog/item/9bf122a4cf54eff39152ee5c.html?

DuplicateHandle v1.2

Written by 风泽(EvilHsu)
Email:fengze@eviloctal.com
Blog:http://hi.baidu.com/fengze

Usage: D:\commandline tools\dhfile.exe

Examples:
1. D:\commandline tools\dhfile.exe /l 868
Search for all files opened by the process with PID 868
2. D:\commandline tools\dhfile.exe /f text.exe
Search for processes that have opened a handle to text.exe
3. D:\commandline tools\dhfile.exe /c 868 text.exe
Unload the file handle of text.exe in the process with process ID 868
4. D:\commandline tools\dhfile.exe /p 868 c:\text.exe
Duplicate the handle of text.exe to the process with PID 868 to prevent deletion of the text.exe file.


[ Last edited by tireless on 2008-12-27 at 14:03 ]
Floor 49 Posted 2008-10-30 19:27 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
httpget.exe (12 KB) Download Tool
http://www.diamondcs.com.au/consoletools/httpget.php

HTTPGet - DiamondCS Freeware Console Tools (www.diamondcs.com.au)
---
PURPOSE: Downloads files from the Internet.
USAGE: httpget <URL>
NOTES: Files are saved to the current working directory.


[ Last edited by tireless on 2009-6-8 at 03:37 ]
Floor 50 Posted 2008-10-30 19:27 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
http://www.maddogsw.com/cmdutils/
1. Recyle Delete files to the Recycle Bin
Recyle v1.5 -- (c) 2000 Matt Ginzton, MaDdoG Software

Sends files to the Recycle bin.
Usage: Recycle.exe filename1
-f: Force recycle, no prompt for confirmation
filenames can include wildcards.

2. PropsFor.exe Display the "Properties" menu of a file

3. Context.exe Display the right-click menu of a file

C:\>Context.exe /text "E:\Program Files\Opera\opera.exe"
1: Open (O)
2: /?
3: Run as (A)...
4: Clipname -->
5: Copy Path Name
6: EmEditor
7: ------------------------
8: Unlocker
9: ------------------------
10: Add to Archive (A)...
11: Add to "opera.rar" (T)
12: Pin to Start Menu (I)
13: ------------------------
14: Send to (N) -->
15: ------------------------
16: Cut (T)
17: Copy (C)
18: ------------------------
19: Delete (D)
20: ------------------------
21: Properties (R)
Choice?


[ Last edited by tireless on 2008-12-27 at 14:04 ]
Floor 51 Posted 2008-10-30 19:30 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
tickcount.exe: displays the time the system has been running since startup (4k)
http://upload.cn-dos.net/img/1030.rar

C:\>tickcount.exe
System up time:
0 weeks 0 days 10 hours 44 minutes 38 seconds and 44 milliseconds.

C:\>


[ Last edited by tireless on 2008-12-27 at 15:27 ]
Floor 52 Posted 2008-10-30 19:31 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
closeall.exe closes all windows on the taskbar
http://www.ntwind.com/software/utilities/close-all.html

[ Last edited by tireless on 2008-12-27 at 15:27 ]
Floor 53 Posted 2008-10-30 19:33 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
tabiripp.exe converts icons in files to png (or jpg)

http://www.thugsatbay.com/tab/?q=other_tabiripp

tabiripp: copyright (c) 2004, t@b software. written by andy flinn.
compression/zlib was written by jean-loup gailly and mark adler.
png code in this program from courtesy of http://www.libpng.org
jpeg code aquired from the folx at http://www.ijg.org

usage: tabscc.exe dirnam outputdir


[ Last edited by tireless on 2008-12-27 at 15:27 ]
Floor 54 Posted 2008-10-30 19:35 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
IconInjector.exe directly replaces the icon of an executable file

http://www.zeraha.org/dload.php?action=license&license_id=2&file_id=27

IconInjector version 0.1 by Nikola Dachev(nikoladd@yahoo.com)

IconInjector replaces the icon group in a PE file (target) with the icon group read
from another PE file or .ico file (source)
NOTE: The entire icon group is replaced, including all resolutions and color
depths for the given icon group depths!

Usage: IconInjector target source

Where:
"target" is the file whose icon will be replaced. Must be a PE format file
(.exe,.dll,.ocx)
"targetIconID" is the position of the icon in the PE file, default is 0
"source" is the file containing the source icon
"sourceIconID" is the position of the icon in the PE file, default is 0
For .ico files, "sourceIconID" is ignored

Example: IconInjector c:\windows\explorer.exe,0 c:\windows\explorer.exe,2
Example2: IconInjector c:\windows\explorer.exe,0 myIcon.ico


[ Last edited by tireless on 2008-12-27 at 15:28 ]
Floor 55 Posted 2008-10-30 19:46 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
PngOptimizerCL.exe A very useful png volume optimization tool

http://psydk.org/PngOptimizer.php (may need to bypass the wall)
PngOptimizerCL-1.8: http://upload.cn-dos.net/img/1173.zip

PngOptimizer can optimize png without distortion, remove useless or incorrect data in the image, and reduce the image volume. In addition, it can also optimize other image formats (BMP, GIF, TGA) and convert them to png format.


Features: fast speed, no distortion, high compression ratio, support batch

PngOptimizer is the GUI version, and PngOptimizerCL.exe is the command line version.

PngOptimizerCL 1.8 (C) 2002/2008 by Hadrien Nilsson - psydk.org
Converts GIF, BMP and TGA files to optimized PNG files.
Optimizes and cleans PNG files.

Usage:

PngOptimizerCL -file:"yourfile.png"


You can use wildcards to convert/optimize several files at once.
Values enclosed with are optional.

Only files which extension is 'png', 'gif', 'bmp' or 'tga' will be handled.
This example handles all PNG, GIF, BMP and TGA files of the current directory:

PngOptimizerCL -file:"*.*"

Press any key to continue


[ Last edited by tireless on 2008-12-27 at 15:28 ]
Floor 56 Posted 2008-10-30 19:50 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
osd.exe displays text on the screen
http://www.dimin.net/software/utils.html

On Screen Display for use with Remote controls

Programmer: Dmitry V. Fedorov <www.dimin.net>

Execution arguments:
-t : specify timeout in miliseconds
-time : show time
-volume : show general volume
-filled : no transparency
-hidetask : hide task bar while showing OSD window
-about : show about text

Any other arguments are just printed on the screen

ex: osd.exe -t 1000 -volume


[ Last edited by tireless on 2008-12-27 at 15:28 ]
Floor 57 Posted 2008-10-30 19:52 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
KanaKey: Send Keys (22.5k)
http://www.kanasolution.com/index.php?fid=13&pid=2&utilid=5

Usage:
KanaKey ...

Example: Send Ctrl+Alt+O
KanaKey.exe CTRL ALT O

[ Last edited by tireless on 2008-12-27 at 15:29 ]
Floor 58 Posted 2008-10-30 20:00 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
xBar
http://myadarola.blizzle.com/pub/methodik/

xBar Command Listing

All commands are meant to be used as command line arguments. Syntax is, of course, extremely important. Please Note: The syntax for xBar has changed 100% from the last release. Meaning, you need to read this part!! Also note: Not all commands use double quotes to enclose information. Some, as shown in the examples, may be in plain text, and may not work when enclosed in quotes.

Clipboard:

$clip$ - when placed anywhere in a xBar command, will substitute in the contents of the clipboard. Can be combined specifically with the program launching commands to provide flexibility and power.
ex.-exec "c:\program files\k-meleon\k-meleon http://google.ca/search?q=$clip$"

Hiding / Showing / Closing:

-hide startbutton toolbars tasks clock systray9x tray systrayxp deskicons taskbar
-show startbutton toolbars tasks clock systray9x tray systrayxp deskicons taskbar
-close startbutton tray deskicons taskbar

The above commands will ( quite obviously ) do the associated function to the specified windows component. Note that while you can use only one switch, you can specify more than one item to follow the switch. ex. xbar -hide startbutton tasks deskicons

Program Launching:

-exec "program name"

Yeah, even I admit that's pretty boring. Where the power is here though, is in the optional commands to follow...

-top - starts the program top-most
-bot - starts the program underneath all other windows
-pos "x y height width" - specifies a startup position and size for the program
-max - starts the program maximized. ignored if -pos is used.
-min - starts the program minimized. ignored if -pos is used.
-title " new title" - obvious again, specifies a title for the program to start with.

Now the reasoning behind all those nice fun commands up there is to mix and match them to allow for some very powerful program launching. Some examples:
-exec "notepad" -top -pos "100 100 400 600" -title "my notepad!"
-exec "c:\program files\k-meleon\k-meleon www.virtualplastic.net" -bot -max
Note that the program name will accept file paths with spaces, as well as arguments. The only restrictions to the -exec command are that you cannot nest the double quotes, and you can only use it to launch programs. That's what the -open command is for.

-open "document name"

Although much more flexible in that it wil allow you to open any document or program on your computer, it is far more limited in that it will only accept two optional commands: -min & -max.


Desktop Work Area:

-desk left-margin top-margin right-margin bottom-margin

Although this looks confusing, it's actually very simple. The first two numbers represent the left and top of the desktop workarea. The second two numbers represent the right and bottom. On a 1024 x 768 resolution, your current desktop workarea ( allowing for the taskbar, and based on a standard taskbar placement ) would be equivilent to '0 0 1024 740'. To adjust these margins, simply add on to the first two, and subtract from the last two. So to add a 100 pixel margin to the left side of your screen, you would specify '100 0 1024 740'. To specify a 100 pixel margin on the right side, you would specify '0 0 924 740'. like I said, fairly simple, right?

Note that you'll have a hard time dragging windows into this area. However, with the ability to launch programs into this area, and with the below ability to move already running programs, you can set up a desktop that allows you to maximize windows as you please without covering up important ones already open.

To find your curernt desktop workarea, use this command:
-desk info


System & General Commands:

-logoff optional: f to force logoff ex. xbar -logoff f
-shutdown optional: f
-reboot optional: f
-sleep

The above commands shutdown, reboot, etc. When used the the optional f argument, they will shutdown or reboot without saving any data - very quick, but will not save anything. You've been warned!

-top partialwindowtitle
-notop partialwindowtitle

The above two commands will, when given a word from the title of an application, give that application top-most status. Or else take that status away.

-move partialwindowtitle (or) #windowhandle xpos ypos
-size partialwindowtitle (or) #windowhandle width height

The above two commands are responsible for moving and or resizing any existing windows. They can either be fed a word from the window title, or the window's handle preceded by a '#'. The handle to a window may be found by using xBar's spy console.

-kill partialwindowtitle (or) #windowhandle (or) all

Very powerful, xBar's kill command can, like move and size, be fed a partial window title or else a specific window handle. As well, it can also be given the argument 'all', to close all open windows.

-pause milliseconds

Mainly used for scripting purposes, this allows pausing between commands.

-ver

Shows a messagebox with the current program version.

-spy

Shows the xBar spy console. from here, you have hands on ability to alter and manipulate many parts of your desktop, and windows.

On Screen Display:

-osd "text to print"

Several optional commands are provided to allow for placing and customizing of the on screen text:

-xy "xpos ypos"
-sec "seconds to display"
-col "colour" - a number corresponding to a colour: 1 = Black, 2 = Red, 3 = Blue, 4 = White, nothing = Green.

Example: -osd "hi there" -xy "450 10" -sec "4" -col "1"

-osdcls - clears the osd display. may be used if the -sec option above is not used.

File Associations:

Although more can be found on .xbs scripts and xBar below, this Command is integral to allowing xBar to use scripts:

-assoc on (or) off

The above when specified 'on', will create a file association in the registry for the .xbs file extension. It will also link an icon to the file. To remove this association from the registry, simply run the command again with 'off' specified.

xTrayTasks Control:

These commands offer control over the application xTrayTasks; allowing that program to be launched without it's usual program icon:

-traytaskson - begins an instance of xTrayTasks, equal to running that program with the argument '-noicon'

-traytasksoff - ends a running instance of xTrayTasks

To use xBar with xTrayTasks, a copy of that program's .exe must be placed into the main xBar directory. For more information on that program and it's usage, please see it's own readme document.


[ Last edited by tireless on 2008-12-27 at 15:30 ]
Floor 59 Posted 2008-10-30 20:00 ·  中国 山东 济南 联通
社区乞丐
Credits -22
Posts 8
Joined 2008-10-29 22:05
17-year member
UID 129502
Gender Male
Status Offline
CheckTCP.exe
FileReplace.exe
fping.exe
GETHTTP.exe
hlshlext.dll
logofdel.exe
NetSend.exe
nttoolkit_hlp.chm
pagesnpp.exe
PasswordAssistant.exe
pwdupd.exe
ServiceScheduler.exe
servicescheduler.ini
ShutdownTimer.exe
Sleep.exe
Floor 60 Posted 2008-10-30 20:16 ·  中国 江西 赣州 安远县 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
HotkeyP.exe (64k)
http://sweb.cz/petr.lastovicka/others.html#hotkey

HotkeyP is a very useful hotkey tool. And most commands support command lines. Some commands:

Shut down, restart, log off
Show the "Shut Down Windows" dialog box
Show the space usage of each drive letter
Empty the Recycle Bin
Start/stop services
Run the default screen saver
Turn off the monitor
Set the screen resolution
Show the desktop (equivalent to pressing Win+D)
Take a screenshot/capture the current window and save it as a bmp image
Random/sequential change wallpaper
Save/restore desktop icon positions
Minimize, maximize, close, keep window on top
Minimize other windows, keep the current window
Set window transparency
Show current window information (title, class, process, priority)
Set process priority
Volume control (increase, decrease, mute)
Eject/close the CD drive
Send keystrokes, mouse clicks, scroll wheel, move pointer
... ...

[ Last edited by tireless on 2008-12-27 at 15:30 ]
Forum Jump: