#148429 - 2005-09-23 06:01 PM
if i call a function, will setdefaultprinter() still work ...pls help
|
p00kie
Lurker
Registered: 2005-09-23
Posts: 4
|
I'm a beginner learning the basics of Kixtart. Twas wondering if someone can help me out with my coding.
Environment: Windows XP-SP2 workstations, Windows 2000 Server
Objective: set default printers, adding printer function works fine
Questions: 1) Set default printer does not work, (error code 2)I've read through the big thread, but I still can't get it to work. 2)when the doc says "printer name" is that the shared device's name under the GENERAL TAB or the SHARING TAB after right-cliking on PROPERTIES
CODE: Code:
IF INGROUP ("zappa\testing") ADD_PRINTERS() SETDEFAULTPRINTER("FieryEB-")
IF ADDPRINTERCONNECTION("\\zappa\FieryEb-") = 0 ? "Added the fieryeb printer" SLEEP 5 IF SETDEFAULTPRINTER("FieryEB-") = 0 ;also tried ("\\zappa\FierEB-") did not work as well ? "Setting default printer to fiery" ENDIF SLEEP 5 ENDIF ENDIF
FUNCTION ADD_PRINTERS() $printer_array = "Ricoh 551", "FieryEB-", "Acct HP 4250", "Xerox DocuColor3535 PS" FOR EACH $element IN $printer_array ADDPRINTERCONNECTION("\\zappa\$element") NEXT ENDFUNCTION
|
|
Top
|
|
|
|
#148431 - 2005-09-27 02:35 PM
Re: if i call a function, will setdefaultprinter() still work ...pls help
|
reedmikel
Fresh Scripter

Registered: 2005-09-21
Posts: 27
|
I was the person who started the "long thread" on this subject 
Do make sure that you specify the server's name as well as the printer's name, e.g. SetDefaultPrinter("\\servername\printer's name(not the share name)"). That was another part that was not clear in the docs - which have just been revised to help us newbies.
Thanks for the doc enhancements guys! When does it become part of the KiX web download, or has it already?
|
|
Top
|
|
|
|
#148440 - 2005-09-29 04:52 PM
Re: if i call a function, will setdefaultprinter() still work ...pls help
|
tjcarst
Hey THIS is FUN
Registered: 2003-09-08
Posts: 243
Loc: USA
|
Why not make your lives easier? Name the printer you install on the server the same name as the share you wish to use. For example on a print server named PS1 you install a printer named research1. Share the printer with the name research1. To connect to it over the network would be \\ps1\research1.
This makes my life much easier.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 2870 anonymous users online.
|
|
|