|
|
|||||||
I started working on this a few months ago, but had to drop it. Now I'M BACK!!! I want to setup a script that checks to see if a user is already setup on a printer, if not add that printer. I tried using ADDPRINTERCONNECTION with the following command: If ADDPRINTERCONNECTION ("\\server\HP4000N-IT") = 0 net use lpt1: \\oak2000\HP4000N-IT EndIf There is a Net2Fax that installs by default to LPT1, but that can be mapped over. I did a search on other posts and someone suggested using the ADDPRINTER UDF. Can someone send me a link on how to use UDF's? thanks, Carlton. |
||||||||
|
|
|||||||
Why don't you go to the FAQ Forum and read the post "How to use UDF's"? There are also other printer-related UDFs in the UDF forum. |
||||||||
|
|
|||||||
you don't need to have any udf as ADDPRINTERconnection() does ADD the PRINTER. if you only want to check the map state of printer, look at www.kixhelp.com/udfs for primapstate() |
||||||||
|
|
|||||||
The first problem I see is that you are using 'net use' which is not a Kix command. You should use the 'use' command like so... Code: use lpt1: '\\oak2000\HP4000N-IT' |
||||||||
|
|
|||||||
Check out this thread and search boards for ADDPRINTERCONNECTION http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=110107&page=0&view=collapsed&sb=5&o=&fpart=1 From what you're asking, you just want a simple script for each group? for one printer to be added? If so, create a group of users for each printer and add users to this printer group. (My Script uses computer group membership using Function ComputerInGroup.udf, not user groups, so you'd need to modify the script that you'll find in the thread I posted above for users, not computers. Or try the simple script I posted here.) This script has not been tested for syntax. Code:
|