Page 1 of 1 1
Topic Options
#56651 - 2001-06-22 08:55 PM ANSWERS HERE!! Mapping Win98 clients to Win2000 server ANSWER HERE!!!
Anonymous
Unregistered


Hi All:

Just to let you all know it is possible to map win98 printers to Win2000 servers. It can be done through the "sendkey" features in kixtart. The orignator and inspiration of a workable solution was done by user Paul_Berquam, but making it map with no printers installed and installing/mapping more than one all in one script was figured out by my wife. She is a programer by trade and figured out how to add any number of printers onto the win98 client via the script. We added 13 printers to a win98 client automatically under 3min on a slow PC. You should make sure that the drivers are on the server for the win98 clients. If you want examples feel free to post here or email me at palerider@ve3d.com

Thanks
Palerider.

Top
#56652 - 2001-06-23 07:56 AM Re: ANSWERS HERE!! Mapping Win98 clients to Win2000 server ANSWER HERE!!!
Ashpoint Offline
Starting to like KiXtart

Registered: 1999-08-27
Posts: 192
Loc: Sydney, NSW, Australia
Yes, I'd like to see that code on this board.

It's been something I've wanted to do for some time.

Top
#56653 - 2001-09-04 11:09 PM Re: ANSWERS HERE!! Mapping Win98 clients to Win2000 server ANSWER HERE!!!
Paul_Berquam Offline
Hey THIS is FUN

Registered: 2000-08-02
Posts: 310
Loc: Sacramento, CA USA
I'm glad that it worked for you Palerider. I pretty much just did that to see if it could be done. Nice to see that it actually works in the 'real world' Unfortunately I can't seem to find my original code, in fact I can't seem to find a lot of the posts on here, so if you could post it for Ashpoint I would appreciate it.

Cheers,

Paul

_________________________
He was a good little monkey and always very curious...

Top
#56654 - 2001-09-06 03:30 PM Re: ANSWERS HERE!! Mapping Win98 clients to Win2000 server ANSWER HERE!!!
Anonymous
Unregistered


Hi All:
Sorry it took so long i do not check the email that is forum sends to as much as my other accounts. Here is the example that I was talking about.
Pale-Rider

;Script to map multiple network printers from Windows2000 print server to
;Windows 98 client machines. 06/28/2001

;Sorry about the comments, but I thought it might help to have some
;explanation of the steps and our current situation.

;We used this script to add 13 (though only 3 are demonstrated here) indentical
;network printers on 120 user machines. Since we wanted to monitor the addition
;of the printers on each machine and the printers essentially only needed to be
;mapped once (saving users time when they logged in), we decided to create a
;scriptadmin login account and went to each machine and logged in as the
;scriptadmin. Over our network, it took approximately 4 minutes to add all of the
;printers. Much better than adding each one individually which would take about 4
;minutes each. Since all of our printers are pretty much identical, we could use
;the same drivers, which saves a lot of time. However, I have included the basic
;steps to get the drivers for a printer if needed.

;We are running a Windows2000 server and all PCs are running Windows 98. We
;tried a number of the "shortcut" methods, but there are significant
;communication problems between Windows2000 and Windows98 so taking it to the
;tedious level was really the only option we discovered at this point. Basically
;the key in this situation is using keystrokes. We treat the Windows2000 server
;as the "typist" typing the appropriate paths/clicks into the AddPrinter dialog
;boxes. You may need to modify the script a bit to select and enter the
;appropriate data for your setup. If in doubt, walk through the process by hand
;and write down the key strokes then translate them into your code.

;This is not the prettiest script, but I'm new to Windows scripting (this was my
;first one), so I'm sure that someone will come up with a more efficient script
;before long. Obviously some of the script is based on the hard work and examples
;of others. This was fun. Thanks.


;Define printers and print server

$printserver = "master_server"
$printer1="1st_floor"
$printer2="2nd_floor"
$printer3="3rd_floor"

if @inwin = 1

;I'm not sure why this worked, but we need to look at least for the first printer
;before we could start mapping. BTW... we removed all printers before starting.
;We could have looked for all the printers and removed them, but that would have
;taken significantly increased the code, and it was easier for us to just login
;and remove them all.

? ".......Please wait..."
If ADDPRINTERCONNECTION ("\\$printserver\$printer1") = 0
? "Added printer connection to \\$printserver\$printer1 ...."
else
? "Error = @error"
Endif
else

;This opens up the AddPrinter Dialog box.

RUN "rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL AddPrinter"

; Give it time to load up - especially over a network

sleep 1

; hit enter to "begin installing printer"

sendkeys("{ENTER}")

;alt+N to select Network printer, then enter

sendkeys("~N")
sendkeys("{ENTER}")

;alt+N will put the cursor in the "path" text box, the path will be entered in
;using the variables you defined above.

sendkeys("~P")
sendkeys("\\$printserver\$printer1")
sendkeys("{ENTER}")

;If you are adding a printer for the first time, you have to selece the
;appropriate drivers. If all of your printers are the same, such as in our case,
;we only had to do the ;following steps once.
;alt+M puts you in the Manufacturer box, then key in the name

sendkeys("~M")
sendkeys("HP")

;alt+P puts you in the printer driver box, key in the printer driver name (or
;modify code to select from disk...whatever you need to do.

sendkeys("~P")
sendkeys("HP LaserJet 4")
sendkeys("{ENTER}")

;Key in a name otherwise it will be the printer driver name

sendkeys("$printer1")
sendkeys("{ENTER}")

;Select "Do not print test page"

sendkeys("~N")
sendkeys("{ENTER}")

;the first one will take the longest, especially if it needs to install the
;drivers. You may need to bump this value up depending on the speed of your
;network.

sleep 15

;Then into the rest of the printers. If they are all the same, you can use the
;same drivers, as the rest of this code assumes. If you have different printers
;with different drivers, then use the code above.

RUN "rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL AddPrinter"

? "Please wait"
sleep 1
sendkeys("{ENTER}")
sendkeys("~N")
sendkeys("{ENTER}")
sendkeys("\\$printserver\$printer2")
sendkeys("{ENTER}")
sendkeys("{ENTER}")
sendkeys("$printer2")
sendkeys("{ENTER}")
sendkeys("~N")
sendkeys("{ENTER}")
sleep 8

RUN "rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL AddPrinter"
? "Please wait"
sleep 1
sendkeys("{ENTER}")
sendkeys("~N")
sendkeys("{ENTER}")
sendkeys("\\$printserver\$printer3")
sendkeys("{ENTER}")
sendkeys("{ENTER}")
sendkeys("$printer3")
sendkeys("{ENTER}")
sendkeys("~N")
sendkeys("{ENTER}")
sleep 8

EndIf

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, 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.033 seconds in which 0.017 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