1
Reply

Help with writing a simly Print Auditing program

charles.mcclendon

charles.mcclendon

Dec 16 2004 8:07 PM
1.9k
Hello, I am new to WMI programming and I would like to write this in C# but VB would also work. Ultimately, what I want to do is audit printer usage on a network and provide a simple authentication method to print. Basically, when a user attempts to print I want my program pop up a form which asks for a password (which it gets from a flat file on a server). If the use enters an incorrect password I want the print to be canceled and if the password is accepted I want to check if the printer is a network printer and if so I want to update a flat log file with information about the user (based of the password entered) and the printer used. AND the number of pages printed. If it is a local printer then I want it to just allow printing with no logging. If I have to just go ahead and log all printing then that is ok I guess. Also, I want to register this as a system service and I don't want it to be childishly easy to circumvent (although it does not have to be hacker proof, it is just for company of about 100 computers with novice users). The main thing I need help with is how to deal with the printing aspects. I don't know how to listen for a print event and then cancel the print event or allow it based of the password. If anyone could help I would GREATLY appreciate it.

Answers (1)