Page 1 of 1 1
Topic Options
#45005 - 2003-09-09 10:09 PM Printer Challenge
tjcarst Offline
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

[Frown]

-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 Offline
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 Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
checked your first link and it gave me nothing.
so thought I give you some links to check:
http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=2;t=004308;p=2#000034
http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=12;t=000370
_________________________
!

download KiXnet

Top
#45008 - 2003-09-10 02:24 AM Re: Printer Challenge
tjcarst Offline
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
#45009 - 2003-09-10 02:43 AM Re: Printer Challenge
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
lot of fun you ment to say [Wink]

anyway, good luck.
playing with that kinda level of printer script is already a thing not many is wishing to even consider.
_________________________
!

download KiXnet

Top
#45010 - 2003-09-10 02:44 AM Re: Printer Challenge
tjcarst Offline
Hey THIS is FUN

Registered: 2003-09-08
Posts: 243
Loc: USA
I just found this topic that addresses Win9x printers AND switching from Novell to MS. I'll see if I can mod to work for my older workstations. http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=1;t=000934#000002

I also stumbled upon this script that looks promising. I'll try to run this tomorrow when I am at work and see what I get. http://home.wanadoo.nl/scripting/download/printers.kix

And yet another http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=2;t=003376#000000 There are so many others wanting to do nearly the same Netware to NT switch and maintain the default printer in the future that I know I'll find something that will work.

[ 10. September 2003, 03:19: Message edited by: tjcarst ]

Top
#45011 - 2003-09-10 03:33 AM Re: Printer Challenge
tjcarst Offline
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
#45012 - 2003-09-10 03:53 AM Re: Printer Challenge
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I started work on a similar project a while back. It was mothballed in the end. Management decided to let the users deal with their own printers. I setup a Win2k printserver and slowly started to remove the NetWare ones. I have one NetWare printer left to remove.

I posted some of the beta code here:
http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=1;t=005934#000001
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#45013 - 2003-09-10 04:11 AM Re: Printer Challenge
tjcarst Offline
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 Offline
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
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.07 seconds in which 0.037 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org