'Map printers
AddPrinterConnection "\\PrintServer\PrinterShareName"
If IsAMemberOf(objNetwork.UserDomain,objNetwork.UserName,"PrinterUserGroup") Then AddPrinterConnection "\\PrintServer\PrinterShareName"
Both of the above are based on my working logon scripts. I simply changed the server name and printer sharename to generic terms.
I have a main logon script for all users on the domain. The "If IsAMemberOf" is part of that. I have created security groups to associate with the different printers and simply add users to the related printer security group of whatever printer they are physically close to.
This is used in the logon script stored at \\DomainServer\netlogon\. (Any script stored here will be replicated to all of your domain controllers automatically)
The "AddPrinterConnection "\\PrintServer\PrinterShareName" " statement is one I use for a local script. I use it for shared computers that are used by many users under different logons. By using a local startup script I can re-create the drive mapping to the printer next to the computer for any user that logs on to the shared computer. Other wise each user would have to "Add" the printer under the local profile that is created the first time they log on to tha particular workstation.
I simply save it to the C:\Documents and Settings\All Users\Start Menu\Programs\Startup folder.
A .vbs logon script is simpley a text file with a .vbs extension instead of a .txt. Just like a batch file is a text file with a .bat extension.