Hello everybody my name is Claudio and, when some days ago I found Open-AudIT, I immediately installed it at work. I really like it's no-agent approach is great, not requiring clients to be "deployed".
Well, using it I found some things not working the way I like, so I patched sources to fit my needs and now it's the time to share my little work with you. Since I don't have SVN access, I'm posting my patches here.
- Annoying DOMAIN\UserName format I have only one domain (with a quite long name) and usernames are in "name.surname" format, so the complete DOMAIN\name.surname becomes too long. I added a remove_domain_from_username parameter in audit.config: [code] ' remove domain part from username and make it lowercase (y/n) remove_domain_from_username = "y" [/code]
Than a little patch to audit.vbs: [code] For Each objItem in colItems net_domain = objItem.Domain net_user_name = objItem.UserName If remove_domain_from_username = "y" Then ' formatting username (remove domain and make all lowercase) net_user_name = lcase(net_user_name) sep = instr(net_user_name, "\") If sep > 0 Then net_user_name = Mid(net_user_name, sep + 1) End If End If Next [/code]
- Optionally scan for floppy drives Even if modern PCs are missing floppy drives, some of my PCs have it and, during the audit, the floppy drive makes some noise alerting my users. After a few helpdesk calls from them, I added a new floppy_detect config variable to audit.config: [code] ' detect floppy drives (y/n) floppy_detect = "n" [/code] Then another little patch to audit.vbs: [code] ''''''''''''''''''' ' Floppy Drives ' ''''''''''''''''''' If floppy_detect = "y" Then comment = "Floppy Drives" if verbose = "y" then wscript.echo comment end if Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_FloppyDrive",,48) For Each objItem In colItems form_input = "floppy^^^" & clean(objItem.Description) & "^^^" _ & clean(objItem.Manufacturer) & "^^^" _ & clean(objItem.Caption) & "^^^" _ & clean(objItem.DeviceID) & "^^^" entry form_input,comment,objTextFile,oAdd,oComment form_input = "" if online = "p" then oIE.document.WriteLn "<tr bgcolor=""#F1F1F1""><td>Floppy Drive: </td><td>" & clean(objItem.Caption) & "</td></tr>" end if Next End If [/code]
- Some clients hangs on Printer Info step Don't know why, but since I don't mind printer infos, I added a new printer_detect config variable: [code] ' detect printers (y/n) printer_detect = "n" [/code]
Then another little patch to audit.vbs: [code] ''''''''''''''''''''''''''' ' Printer Information ' ''''''''''''''''''''''''''' If printer_detect = "y" Then comment = "Printer Info" [/code]
I'm ready to send my patched files if you think my patches were usefull. NOTE: I've formatted the audit.config file to match some *nix style, like: [code] ' This parameter does this and that ' values: (y/n) parameter = "n" [/code] this way the file is quickly self-explanatory. Hope you use this format in the future, saving us to guess what options mean.
Thanks for your great work. Claudio
_________________ Claudio Nicora http://coolsoft.altervista.org
|