All Forums >> [Scripting] >> Post a VBScript >> Printer Usage Statistics Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
This script is designed to be placed on an IIS web server so that the stats can be made available to_ selected users on your Intranet. But it works just as well from XP's built in IIS.
1. Create directory in the root of your web server called "pc" (lower case) 2. Create another directory within /pc called "template"
3. Save the following code into a file called "1.asp" and place in "pc" directory
4. Save the following code into a file called "2.asp" and place in "pc" directory
5. Save the following code into a file called "3.asp" and place in "pc" directory
6. Save the following code into a file called "4.asp" and place in "pc" directory
7. Save the following code into a file called "5.asp" and place in "pc" directory
8. Save the following code into a file called "6.asp" and place in "pc" directory
9. Save the following code into a file called "default.asp" and place in "pc" directory
10. Save the following code into a file called "footer.inc" and place in "pc/template" directory
11. Save the following code into a file called "header.inc" and place in "pc/template" directory
12. Save the following code into a file called "sup.css" and place in "pc" directory
13. Save the following code into a file called "PrinterCounts.vbs" and place in "pc" directory
13. PrinterCounts.vbs needs to be run from a scheduled task (early in the morning each day) to populate the database. I have a database with ~100,000 entries (print jobs recorded in the last 28days) While it took several hours to_ completely build the database initially, it only takes milliseconds to retrieve the stats. (amazing performance)
The only hard bit is the database queries. These are like black magic used by SQL gurus, but I have discovered a really easy technique that anyone can use to build them.