Page 1 of 1 1
Topic Options
#173856 - 2007-02-12 08:29 PM SetDefaultPrinter not working
MEldridge Offline
Fresh Scripter

Registered: 2007-02-12
Posts: 5
Loc: Michigan
I am very new to kixtart and/or any type of scripting. I am working with a script that someone else made for my company and I am trying to add in default printers. everything works fine as far as adding the connections to the printers.

heres a small portion of the code that relates to the printers.....

 Code:


if $user = "Administrator"
    use y: /delete
    use y: "\\pmcg-mgb-01\users"
    Addprinterconnection("\\$prtsvr\4100-Pr")
    Addprinterconnection("\\$prtsvr\4100-Pl")
    Addprinterconnection("\\$prtsvr\HP9000")
    Addprinterconnection("\\$prtsvr\RICOH_1045 ")
    Addprinterconnection("\\$prtsvr\LaserJet5n")
    Addprinterconnection("\\$prtsvr\HPLaserJ Precision")
    Addprinterconnection("\\$prtsvr\3175_fax")
    Addprinterconnection("\\$prtsvr\4100-PMC")
    Addprinterconnection("\\$prtsvr\3175_fax_2")
    SetDefaultPrinter("\\$prtsvr\4100-Pr")
endif 





I appreciate any and all help!


Edited by MEldridge (2007-02-12 08:32 PM)

Top
#173858 - 2007-02-12 08:37 PM Re: SetDefaultPrinter not working [Re: MEldridge]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
Hi MEIdridge, and welcome to the board.
When you use 'AddPrinterConnection()' you use the printer Share Name, but
When you use 'SetDefaultPrinter()' you use the fully Qualified Printer Name not the Share Name.
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#173860 - 2007-02-12 09:09 PM Re: SetDefaultPrinter not working [Re: Benny69]
MEldridge Offline
Fresh Scripter

Registered: 2007-02-12
Posts: 5
Loc: Michigan
could you elaborate a little more?
what exactly is the fully qualified printer name? is that just the name of the printer? or is there more to it than the name?

Top
#173861 - 2007-02-12 09:24 PM Re: SetDefaultPrinter not working [Re: MEldridge]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
goto 'Printers and Faxes'
right click on the printer that you want to be set as default
select properties
select the ports tab
select the printer
scroll to the right (in the printer column)
what it says in that column is the printer name
use that in the 'SetDefaultPrinter()' function
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#173885 - 2007-02-13 03:47 PM Re: SetDefaultPrinter not working [Re: Benny69]
MEldridge Offline
Fresh Scripter

Registered: 2007-02-12
Posts: 5
Loc: Michigan
awesome, thanks for the help, I now have it all working.

Now to start on the next phase and break it all again.

\:\)

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 869 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.054 seconds in which 0.024 seconds were spent on a total of 13 queries. Zlib compression enabled.

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