Tools for Windows

  German version of this page
All tools on this page work under Windows 2000 and higher. They are Freeware.

- usage in any environment, including commercial
- include in software products, including commercial
- include on CD/DVD of computer magazines

Not allowed:
- modify any of the files
- offer for download by means of a "downloader" software

I don't ask for donations but some users insist, so
PayPal and BitCoins 19ktLtQr3URoi1YM6ZBy9SRodteGiNf9Wd / QR are welcome.


  USB Device Tree Viewer
Got his own page: UsbTreeView



  Device Cleanup Tool V0.5 - removes non-present devices from the Windows device management
Each once attached device leaves an entry in the Windows device management. By means of the Windows device manager you can delete one by one only. With this tool you can delete multiple or all non-present devices.

The 'last used' time comes from the write time of the device's registry key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum, on some Windows this seems to be set on boot or any other time.




Last update: 09 Jan 2016


  Device Cleanup Cmd V0.4 - removes non-present devices from the Windows device management
This is the command line version of DeviceCleanup, see above.
DeviceCleanupCmd [-t][-s][-m:age][-n] pattern1 [pattern2] [patternN]
-t  test only
-s  skip creation of a system restore point
-m:age  minimum 'age' (last use of the device must be at least that old)
-n  no wait when finished

patterns are device IDs to remove, wildcards can be used

remove all devices whose device IDs begin with HID\VID_045E
DeviceCleanupCmd HID\VID_045E*

remove all devices whose device IDs contain VID_045E
DeviceCleanupCmd *VID_045E*

remove all devices not used for 1 year or more (m - month, d - days, i - minutes)
DeviceCleanupCmd * -m:1y

remove all devices
DeviceCleanupCmd *

remove all devices
DeviceCleanupCmd *

show which devices would be removed (test mode)
DeviceCleanupCmd -t *

Non-PnP devices are not removed


Letzes Update: 08.02.2015


  RunAsSystem V1.3.3 - starts a process in the SYSTEM context
RunAsSystem is helpful when admin privileges are not enough. For instance since Vista there are registry keys whose owner is the administrator but without the privileges to write or change the rights.

RunAsSystem passes the window style and its process priority to the exeucted process. Both can be overruled by commandline params.
It waits for the started process to end and then passes back its return code (aka errorlevel). But it is a Windows application, in a batch file you have to put a "start /wait" in front.
Some programms do not work and end immediately in the System context.
Up to V1.2 this worked under XP only if the Sysinternal ProcessExplorer was running before, it seems that it changes the process access privileges to gather all the information but forgets to restore the found privileges.


RunAsSystem [-min|-max|-normal|-noact|-hid] [-low|-below|-normal|-above|-high] "executable" [params for executable]
RunAsSystem "%windir%\regedit.exe"

RunAsSystem "%windir%\System32\cmd.exe" /k dir /s "C:\System Volume Information"


Last update: 23 May 2015


  CloseWindow V0.3 - closing windows
CloseWindow closes windows by commandline. For identifying the right window either the window text (the caption) or its class must be given at the commandline.
CloseWindow -text="windowtext" -class="windowclass"
Wildcards can be used.

Sample: Close all Windows Calculators

closewindow -text="Calculator" -count=999
Sample: Close Explorer window (XP) of drive U:
closewindow -text="U:\*" -class="ExploreWClass"
Sample: Close Explorer window (Vista+) of drive U:
closewindow -text="U:\*" -class="CabinetWClass"
The window class can be determined by my tool WinInfo

This works within the same user context only: If you want to close a program started "As Administrator" under Vista+ then CloseWindows must be started "As Administrator" too.


Last update: 20 Feb 2016


  FindEXE V0.4 - find the full path to an executable file
FindEXE is a commandline tool which shows the path of an executable which Windows would start.


FindExe calc



Last update: 07 Feb 2016


  Sleep - Console program that waits for n milliseconds
Sample for waiting 1 second:
sleep 1000


Last update: 7 June 2007


  BinHexDec - Convertor for Hex, Dec and Bin numbers


Last update: 19 Aug 2009


  COM Name Arbiter Setter V0.7 - gives control over reserved COM port numbers
Whenever a new COM port is installed, Windows looks for the first never used number. This ensures that there are no conflicts when two of the devices are attached at the same time.

In real live the users do not use their devices (as USB to COM adaptors) at the same time, but the COM numbers increase and increase...

Windows stores used COM port numbers in the registry in the value ComDB under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\COM Name Arbiter
It is 32 bytes with 8 bits in each byte. A set bit makes a port number (1..256) reserved.

"Apply" writes the bits to the registry which requires admin privileges.

Removing the reservation does not do anything else than making Windows reassign the number to a new device when it is attached.
As long as the new device is not attached at the same time as the device which had these COM port before there is no problem.
If the devices are attached at the same time then the second one will not start because it cannot create its "COMx" symbolic link. This happens too if a new device wants to get a port which is supposed to be free because its arbiter bit is not set but in fact the port is in use! So don't clean up to much...

Since V0.5 you can delete a symbolic link by right-clicking it.
F5 refreshes the list (done automatically since V0.5).

Started with parameter /rnp (remove non present) it sets currently non present ports to 'available' and ends without showing the dialog.



By unchecking and pressing "Apply" reservations can be removed.


Last update: 13 April 2014


  CreateFile Tester - Testing the Windows API call CreateFile
The CreateFile Tester is useful for testing different parameters for the Window API call CreateFile. Furthermore it can open files exclusively to test the behaviour of other programs when they try to open such an exclusiveley opened file.




Last update: 09 Dec 2009


  DeviceIoControl Code Decoder
Decodes Windows DeviceIoControl hex values or names as listed here (in both directions).




Last update: 22 Feb 2016


  LogWindowAtPoint - Logs Windows at a certain position
This tool is useful to identify randomly popping up windows.




Last update: 10 April 2016


  LogForegroundWindow - Logs the Windows which get the input focus
This tool is useful to identify windows which steal the focus from the active window.




Last update: 10 April 2016


Counter since Feb. 1998


Uwe Sieber