RPRINTER.COM A Kludge that helps Why the kludge? --------------- With 30 remote printers, one of the biggest frustrations at our company was the proverbial "Who stole ACC1?" saga. Our administrator and I tried a number of things, including restricted access to RPRINTER.EXE, but this didn't work; the user GUEST needed rights to it, as people needed to run printers if a person was out sick. Next we tried putting it in directories in the workstations' local drives, in order that it may be removed from the network altogether. As many of you know, between preparations for classes, printer maintenance and the every day life that goes along with babysitting a LAN, somehow there was never enough time to get this done for all printers. Then Tony came up with a great idea - intercept the call to RPRINTER.EXE, and log it to a file. That is exactly what this package does. What you need ------------- Just Netware, and a version of RPRINTER.EXE that supports the -S option. If you cannot get a status listing with RPRINTER -S, then this solution is not going to work for you. I would suggest that you scan NOVLIB and pick up the latest printer utilities. What it does ------------ RPRINTER.COM is a Builder script that launches RPRINTR.EXE (note the missing E in the name), and immediately afterwards runs RPRINTR -S while directing the output to a file. It reads the printer names from this file for logging purposes, then deletes it. A file is then created named .LOG in the directory of your choice, that contains only one line. The offending user, date, time and station number are shown for the most recent loading of RPRINTR.EXE for a given printer. RPRINTER.COM will use only the first 8 letters of a printer name, since the file names must be legal. If you have printers with lengthy names, you may find this to be a problem. Why the station number? We had some folks who learned that they could log out, and the printer would still work. They learned to do this whether they actually had a printer attached or not. This way, if the log showed this station number as NOT-LOGGED-IN on the console, we could blow away the connection to make the printer available again. As for RPRINTER.COM spawning the EXE file and not leaving a hole in memory, we have no idea why this does not happen. But then again, who are we to ask such questions? It works, works right, and that's about all we care. You will also find RPRINTER.BLD, the Builder script used to create this. It is provided so that you can know exactly what's happening here, and in the event you have Builder you can tweak it to your heart's content. Putting it in ------------- We make a pretty extensive use of environment variables in our company, and used them in this utility. Our system login script includes the following: DOS SET USER="%LOGIN_NAME" DOS SET STA="%STATION" It is possible that you could run into some enviroment size problems with this setup, though the above should take at most 26 bytes. All of our workstations have a SHELL= statement in the CONFIG.SYS which sets an increased /E: size. But that's a different utility... In addition, rename RPRINTER.EXE to RPRINTR.EXE. You will most likely need to use FLAG to allow this. A text file called RPRINTER.CFG is included, which allows you to specify where RPRINTER.COM places its output files. If take a look at it with an editor, you will know what to do. This program was not tested with invalid path names in the configuration, so don't blame us if that gives you a problem. The configuration file was used rather than making assumptions about what the current directory is at the time RPRINTER.COM is run. You can (should) tweak it to fit your situation. Now, subsequent calls to RPRINTER will be logged, and you can chastise printer thieves accordingly. Especially those who panic and grab 7 different printers, just trying to get their document to come out. And now, a word from our sponsors --------------------------------- RPRINTER.COM is hereby placed into the public domain, but there are some other toys out there that you may or may not know about. First on the list is CRITERR.COM, available in NETERR.ZIP in the libraries. It's from Infinite Technologies, and it's an incredibly small TSR that will intercept any critical DOS errors and reboot the machine. If you have dedicated print, fax or mail servers, you need this utility. Second is Scott Wertz's SRCH.EXE, found in SRCH17.EXE in the libraries. If you ever have a need to sweep the file server and accomplish a task repeatedly, this will help immensely. Buy them both today! The price is right! Credits and stuff ----------------- Tony Sica 76170,1324 Concept and design Andy Becker 70523,3153 The rather ugly programming If you have any suggestions, or could use a few changes made before this can really be of use to you, please contact either of us and we'll be glad to listen. Happy computing!