#148254 - 2005-09-21 08:23 PM
Documentation: clarify SetDefaultPrinter and AddPrinterConnection
|
reedmikel
Fresh Scripter

Registered: 2005-09-21
Posts: 27
|
As a KiX newbie(but a longtime assembler/FoxPro/C programmer)I spent many hours trying to get SetDefaultPrinter("Printer name") to work as described in the docs. The paragraph that explains the parameter "Printer name" seems inaccurate, as it tells you to use "\\servername\sharename" if you previously added a printer with AddPrinterConnection("Printer name"). I spent many hours before I found out the correct syntax is SetDefaultPrinter("\\servername\printer's name"). Using "\\servername\sharename" does not work - it returns error code 2.
Suggestion: rewrite the explanation of the "Printer name" parameter for BOTH commands, something like follows:
AddPrinterConnection: Parameters: Printer name: string that specifies the fully qualified(UNC) name of the shared printer, in the format "\\servername\sharename"
Note that, unlike the SetDefaultPrinter("Printer name") command, the "Printer name" parameter used in AddPrinterConnection is the shared name of the printer, not the actual name of the printer.
SetDefaultPrinter: Parameters: Printer name: string that specifies the actual name of the printer, in a fully qualified(UNC) format such as "\\servername\printer's name".
Note that, unlike the AddPrinterConnection("Printer name") command, the "Printer name" parameter used in SetDefaultPrinter is the name of the printer, not the shared name of the printer. The printer's actual name is displayed on the General tab of the Properties for that printer.
Thanks!
|
Top
|
|
|
|
#148256 - 2005-09-21 10:53 PM
Re: Documentation: clarify SetDefaultPrinter and AddPrinterConnection
|
reedmikel
Fresh Scripter

Registered: 2005-09-21
Posts: 27
|
Thanks - that's all I was hoping for when I originlly posted my comments in the Newbie forum. I did not want to inflame anybody
|
Top
|
|
|
|
#148263 - 2005-09-22 10:31 PM
Re: Documentation: clarify SetDefaultPrinter and AddPrinterConnection
|
iffy
Starting to like KiXtart
Registered: 2005-05-29
Posts: 149
Loc: The Netherlands
|
Hmm.. and shouldn't it be mentioned that I sorta introduced you to KiX 
Btw.. what are ya doing these days Mart now the big blue D is not more?
Edited by iffy (2005-09-22 10:32 PM)
|
Top
|
|
|
|
#148267 - 2005-10-18 03:49 PM
Re: Documentation: clarify SetDefaultPrinter and AddPrinterConnection
|
Bamse
Lurker
Registered: 2005-10-18
Posts: 2
|
To bring this post alive again, but with a bit of a different touch.
Why use separate "naming convntions" on such related operations? Why not use the share name on both functions? In my case, where I often come in to already existing environments with well established names and shares (as in "cannot change either") and help with moving shared printers from one server to another, it's really a hassle if I do not want to hardcode printer names in the script (which I really want to avoid due to the production of a quite generic script what will work at different companies with only a small change)
My suggestions is to change the function SetDefaultPrinter so that the function will accept and make use of the share name. If this is an addition of functionality (both share and printer name will work) or if it is a replacement so only share name will work ... well. I don't really mind ... 
Is there any room or similar for this?
|
Top
|
|
|
|
#148271 - 2005-10-24 09:31 AM
Re: Documentation: clarify SetDefaultPrinter and AddPrinterConnection
|
Bamse
Lurker
Registered: 2005-10-18
Posts: 2
|
thanks for all the info!
jooel: i did supect kix was using api calls etc, but my suggestions stands
|
Top
|
|
|
|
#148272 - 2006-02-17 06:02 AM
Re: Documentation: clarify SetDefaultPrinter and AddPrinterConnection
|
Oggie
Lurker
Registered: 2005-05-03
Posts: 4
Loc: Perth, Western Australia
|
Has this changed at all in 4.50? I have been using AddPrinterConnection/DelPrinterConnection/SetDefaultPrinter using the same printer names (e.g. \\Server\Long Printer Name). Our share names are short 8 character names that don't always match the first 8 characters of my Long Printer Names. My scripts "APPEAR" to be working??? Am I doing this wrong?
|
Top
|
|
|
|
Moderator: Lonkero, ShaneEP, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart
|
0 registered
and 652 anonymous users online.
|
|
|