#45005 - 2003-09-09 10:09 PM
Printer Challenge
|
tjcarst
Hey THIS is FUN
Registered: 2003-09-08
Posts: 243
Loc: USA
|
There are multiple phases I wish to perform and it is a bit confusing so I think I will list them as numerical steps. I have Win 95, NT, 2K and XP workstations in a Windows 2000 single domain.
#1 - obtain current and default printer(s) for each user that logs onto a computer and write to a PrintSetup.ini file. Create subdirectory for each @WKSTA+@USERID (multiple people using each pc). Good example of the logfile I'd like to create http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=10;t=000021. I've actually modified this and am able to create the subdirectory on the print server and write the PrintSetup.ini file. I just don't know how to query this logfile for further use by the following steps, specifically #4.
#2 - create printer groups in Active Directory for the COMPUTERS (not the USERS) and manually add the computers to the AD group. (AD group name format to be 'Q-ITS Printer' for the 'Q-ITS' printer share on a server).
#3 - get the current \\oldprintserver\printer(s) and replace with \\newprintserver\printer(s) and write results to a log file. Here's a nice format for displaying the results of the script that I like http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=10;t=000021.
I'm not sure if I need an .ini file for this to map groups to printers, but prefer to use a variable since group and printer names are similar. To further complicate matters, I am changing users from a Novell server to Microsoft server. This script doesn't work for the Novell printers http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=1;t=005216#000008.
#4 - after changing printers over to Microsoft, I'd like to maintain printers for future users by using ComputerInGroup to check for a printer based on the newly created printer groups and install it if not installed. http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=12;t=000457.
#5 - I haven't decided how to maintain the current default printer
-tjcarst
[edit] Corrected URL in item #1. A period was included in the URL. H. Bullock [/edit] [ 10. September 2003, 04:20: Message edited by: tjcarst ]
|
|
Top
|
|
|
|
#45006 - 2003-09-09 11:38 PM
Re: Printer Challenge
|
tjcarst
Hey THIS is FUN
Registered: 2003-09-08
Posts: 243
Loc: USA
|
#1 isn't working afterall. It doesn't support 95. So i guess I need to do some more work. Drat!
|
|
Top
|
|
|
|
#45007 - 2003-09-09 11:47 PM
Re: Printer Challenge
|
Lonkero
KiX Master Guru
   
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
|
|
Top
|
|
|
|
#45008 - 2003-09-10 02:24 AM
Re: Printer Challenge
|
tjcarst
Hey THIS is FUN
Registered: 2003-09-08
Posts: 243
Loc: USA
|
H. Bullock - Thanks for the correction. Sorry about the bad link.
Lonkero - Thanks for the links. I have these already along with at least 30+ other scripts and UDFs. As they are, they won't exactly work. I am a Kixtart beginner and have found this site to be extremely knowledgeable. I thought I might get lucky and find exactly what I need, but realize I am going to need to spend some time tweaking and testing to get it to work for me.
Getting the group names out of AD and setting the printer based on this group is going to be my biggest challenge. -- Thanks for posting the ComputerInGroup UDF. -- If I can get the script to work that gets the default printer in use and use it to create groups, it will at least keep me busy for awhile. I see I have a lot of work ahead of me.
-tjcarst [ 10. September 2003, 02:34: Message edited by: tjcarst ]
|
|
Top
|
|
|
|
#45011 - 2003-09-10 03:33 AM
Re: Printer Challenge
|
tjcarst
Hey THIS is FUN
Registered: 2003-09-08
Posts: 243
Loc: USA
|
I have to be getting closer.
http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=1;t=002478#000001
I will need to test this tomorrow as well. Specifically, if the script posted by Mark Antrobus always deletes existing printers or only if netware, as I want to do. Once all of netware is gone, I will no longer need this checking to be performed. He also shares a script that creates a logfile for current printers and he mentions group membership being used for future printers (though he didn't post this snippet, but offers it).
|
|
Top
|
|
|
|
#45013 - 2003-09-10 04:11 AM
Re: Printer Challenge
|
tjcarst
Hey THIS is FUN
Registered: 2003-09-08
Posts: 243
Loc: USA
|
Thanks, les_ligetfalvy.
I actually just forwarded that link to my work address for further investigation tomorrow as I thought it looked very promising.
Even if I could just do the replace of \\olderserver\oldprinter with \\newserver\newprinter and create a log file, it will get me closer to retiring the netware server. I can deal with the future default printer issue later.
|
|
Top
|
|
|
|
#45014 - 2003-09-10 04:35 AM
Re: Printer Challenge
|
tjcarst
Hey THIS is FUN
Registered: 2003-09-08
Posts: 243
Loc: USA
|
Here's a link to another site that uses computer group membership as well.
http://www.kixscripts.com/forum/tm.asp?m=581&p=1&tmode=1
Posted by Howard Bullock: You will need to create a group for each printer you want to map.
For example, if your printer is named " laserjet1" on the server named " server1" then create a group called " prt_server1~laserjet1" . Place the computers that should map this printer into the group.
code:
$usr = GetObject(" WinNT://" + @domain + " /" + @wksta + " $$" ) if @error <> 0 ? @serror else For Each $grp In $usr.Groups $GrpName = $grp.Name if left($GrpName, 4) = " prt_" $printer = substr($GrpName, 5) $printer = join(split($printer," ~" )," \" ) AddPrinterConnection(" \\" + $printer) endif Next endif
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(mole)
and 1300 anonymous users online.
|
|
|