|
|
|||||||
Hello, I am running a couple of Win2k3 (Enterprise) servers. One of this server is hosting all the printers (100 to be exact). These 100 printers all have names like AMS-PR1 to AMS-PR188 (only the uneven numbers are on this server). All the printers have a department in their Location (Sales, Development etc..), and the Locationname in the Descripting (Amsterdam) I'm using KiX as a logon script, but now theres a thing i can't seem to fix. What i want to do is adding a printer to a user, but only a printer in his own group (e.g. Sales).. One of the random printers in the department.. Is there a way to do this with KiX? I hope to hear from you soon, Thanks in advance! |
||||||||
|
|
|||||||
Hello and Welcome to the board. Yes it can be done, but why would you want to install a "random" printer even from a specified group? What version of KiXtart are you using and what are you desktop OS that are in use that need to be supported. |
||||||||
|
|
|||||||
Hello, First of all, thanks for the reply. I am running the latest version of KiX (as always). My workstations are all running under Windows XP SP2. Here's a picture of my network: - 2 Fileservers with printers spread (uneven = FS1, even = FS2) - 100 printers per fileserver - 10 departments (Administration, Aftersales, Transport, Management, Communication, Development, Sales, Marketing, Helpdesk, Sysop) - All the printers have a location (the departmentname) Now i have to connect the closest printer, thus one in the office of the department, e.g. Sales.. I hope this clears up any questions -- Edit: I guess theres also another "quick 'n dirty" solution, to check what group the user is in, and then add a random printer out the scope (For example: AMS-PR155 - AMS-PR165) but i'd like to use the Location-field) |
||||||||
|
|
|||||||
Any suggestions? |
||||||||
|
|
|||||||
See if this thread helps... http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Board=UBB13&Number=112039 |
||||||||
|
|
|||||||
Well if you want to read the description field then you can check out one of the WMI Printer Scripts and see if it gives you the details you want. If not then you can create your own if it's supported. If InGroup('Sales') And WMIcode or registry code to read description, Map Printer. You could also maybe fill out an INI file to read the wanted information and do an Ingroup call. A few ways to do it. Do you need actual code examples or are you reasonably familiar with KiX to do it? |
||||||||
|
|
|||||||
I used kix before, but im not that experienced.. Some examples (especially the WMI stuff) are very welcome Edit: I found some code like: Code:
But how can this be ported to KiX? |
||||||||
|
|
|||||||
Sorry to bump this topic, i really need this |
||||||||
|
|
|||||||
What OS are the clients running? |
||||||||
|
|
|||||||
Quote: |
||||||||
|
|
|||||||
Al, My guess is that he wants to do a double check. 1. Check if user is a member of a certain group 2. Check the "description field of the shared printer for a specific phrase" If InGroup("x") And (Description contains x) EndIf At least that's how I read it. The issue would be how to get that shared phrase either from the registry or from WMI |
||||||||
|
|
|||||||
Well checking groups isn't the problem, checking the printer properties is.. I've searched the forum but i couldn't find any printer querying. I do have a VBscript (as you can see a few posts up) that gives the location of the printer and the sharename... |
||||||||
|
|
|||||||
^^ kick ^^ Please? |
||||||||
|
|
|||||||
Sypher, Does this help? Code:
Kent |
||||||||
|
|
|||||||
Well, a fairly direct translation losing the wooly bits is: Code: Dim $objWMIService, $objItem, $colItems, $strComputer |
||||||||
|
|
|||||||
Well as far as i can understand it, it looks like it'll work. Now the point is to randomly select one of the printers that match the user group (which is named G_Groupname) and bind it to the user... |
||||||||
|
|
|||||||
I don't get this random bit. What are users supposed to do, check all the printers to see which one they won in the lottery? |
||||||||
|
|
|||||||
My geuss was that he is trying to do a "printer pool" type thing. Having a bunch of printers in one location and making sure that everyone does not connect to the same one. |
||||||||
|
|
|||||||
Would it not be better to setup printer pooling on the printserver? I mean, the server knows which printer is available at the moment the job is submitted. A logon script that picks a random printer at logon makes no sense. Smells like a supervisor brainfart. |
||||||||
|
|
|||||||
I agree, but we don't know the circumstances and you are most likely correct with the Quote: |
||||||||
|
|
|||||||
No way, i am not a supervisor of any kind. I am a student and we had received the assignment to setup a network, with as a requirement it needed the Printer Location Stuff. Also, i have used kix with Kixforms before, so i know it a bit. The only thing is that i asked you guys to give me a "Kickstart" in order to create the script... Geez.. |
||||||||
|
|
|||||||
The implication was not that you were a supervisor but that you had been directed by one to do something that does not make sense. |
||||||||
|
|
|||||||
Correction: Smells like a teacher brainfart. |