Page 1 of 1 1
Topic Options
#162217 - 2006-05-22 03:51 PM Install Local Printer
tylan Offline
Starting to like KiXtart

Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
Is there an easy way to install a local printer using kix?

Right now, I'm just shelling to this command:
RUNDLL32 PRINTUI.DLL,PrintUIEntry /if /f %windir%\inf\ntprint.inf /r "file:" /m "Epson LQ-1000" /b "Epson LQ-1000" /Y /q

However, printui.dll installs the printer regardless of it existing or not. I see that as wasting time during the logon. I'd be satisfied even w/ a simple IF..ENDIF to make that only run one time. Ideas?

Top
#162218 - 2006-05-22 04:15 PM Re: Install Local Printer
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Hi.
Installing a local printer depends first of that the user had administrator-rights on the machine - not to fond of that idea.
Second - Wouldn't onsite-personell be able to do this first of when delivering the printer?

If your users are administrators (or have eqal rights as one), there is prolly some nice way of doing this. First idea that popped into my mind was to have the printer connected by the user, and when connected, added to a group, and with a simple if ingroup-statement do this after asking the user if the printer is correctly connected.. but.. somehow I can smell alot of failures here.
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#162219 - 2006-05-22 04:30 PM Re: Install Local Printer
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
When you install a local printer, it will put it in the registry. You could look in the reg to see if it is installed. There are several UDFs posted that can install local printers and some that will enum printers too.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#162220 - 2006-05-22 04:45 PM Re: Install Local Printer
tylan Offline
Starting to like KiXtart

Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
I'm not trying to install a "REAL" printer. I'm installing a file printer for an application. Nothing really prints to it, rather it's just used for generating output. Much like a PDF printer.

Les - good idea. I can just query the registry to see if it exists.

Top
#162221 - 2006-05-22 04:47 PM Re: Install Local Printer
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
ooooh. lol. Well then, Les hit the spot. And like he says there's plenty of capable udf's here.
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#162222 - 2006-05-22 05:01 PM Re: Install Local Printer
tylan Offline
Starting to like KiXtart

Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
PrinterExist UDF looks great. Sometimes I wonder why I ask questions on this BB, when I should have just looked at the UDFs first.

BTW - - Oddly enough a person w/ only "USER" level permissions seems to be able to install the EPSON LQ-1000 file printer. I'm guessing it's because they aren't REALLY adding new hardware.

Top
#162223 - 2006-05-23 10:27 AM Re: Install Local Printer
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Now that's interesting indeed. perhaps anyone with greater experience can answer why that is so.
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#162224 - 2006-05-23 11:04 AM Re: Install Local Printer
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Well I believe that on XP you must have Admin or Power User rights and Load/Unload driver rights to install a LOCAL printer, to install a Network printer may require the same rights on XP, but a normal user might be able to add a network printer on Windows 2000

If the drivers are already on the system then the file copy would not need to be completed only a connection which is typically in HKCU - Though I would think that on XP it still "should" fail, but would probably work just fine on 2000

Top
#162225 - 2006-05-23 05:37 PM Re: Install Local Printer
tylan Offline
Starting to like KiXtart

Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
I **SWEAR** that it worked yesterday. I tried at some workstations today, and it wouldn't install the file printer. I ended up putting a "shell" statement to call a batch file as another user. Is there a way to make the "shell" command wait until the batch file is finished before proceeding w/ the script?
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 837 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.058 seconds in which 0.024 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