Shellexecute – Printing with the default application

This script prints the file in the first argument with the windows default application.


If you save the code in the file test.doc -> Opens Microsoft Word (if it is installed) and prints the file to the default printer. mytextfile.txt -> Same. But prints with Notepad

Directory Watcher

You can use this script, if you want to watch for activity on a
directory. It shows you every write and delete of a file in a specified

Show all processes with IDs

This script shows all running processes with their process IDs. It uses the wmi-class from Tim Golden. Please put it into the directory where you run this script from.

Two instances of Windows Explorer (other example)

Another example which creates two Microsoft Internet Explorer instances.


This script watches for activity at the installed printers and writes a logfile. It shows how much a user has printed on wich printer (works also with network printers).

But it has a proplem with counting the right amount of printed pages 🙁

It uses the wmi-class from Tim Golden, which you can download from his webpages. Please put the in the same directory where you run this script from.