Page 1 of 1 1
Topic Options
#21218 - 2002-05-05 12:18 AM Network Printers
Bob Deerinwater Offline
Starting to like KiXtart

Registered: 2002-05-05
Posts: 101
Loc: Covina California
I am fairly new at this but this is what i am trying to do. I am trying to add network printers to win95 and win98 pc's with a logon script.i can accomplish this by running the start command.... but the printer properties box keeps appearing. this is just an annoyance with our user. so what i thout is i would use the kexist function of kixtart and if the ke was there i would skip the start command this is what the code look like.The .bat is (start \\server\printer. Hope this makes since and if this cannot be done then i will have to live with the printer properrtieds boxes

If keyexist HKEY_LOCAL_MACHINE\SYSTEM\Control\Print\Printers\HP LaserJet 5")=0
run I43300.BAT
ENDIF

Top
#21219 - 2002-05-05 12:55 AM Re: Network Printers
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Kixtart cannot natively add network printers to Windows 9x. There has been limited success using SENDKEYS to automate this process but IIRC nothing has really worked. The main problem is that the printer drivers need to be installed. Thus, I think you will be stuck with your method.
_________________________
There are two types of vessels, submarines and targets.

Top
#21220 - 2002-05-05 07:19 AM Re: Network Printers
Bob Deerinwater Offline
Starting to like KiXtart

Registered: 2002-05-05
Posts: 101
Loc: Covina California
The issue with the print drivers being installed is not a problem. If the printer is installed i want to skip ther start command from the bat file thus eliminating the printer properties box popping up. i understand that kixtart does not set up network printers that is why i am running another bat file using the start \\server\printer command from a bat file. i gues i am asking what is the proper syntax to use the keyexist function. what i the script to to is look in the registry if the key exist i want to skip the bat file
Top
#21221 - 2002-05-05 08:43 AM Re: Network Printers
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Hello Bob,

Your missing some syntax as well as having the wrong Registry path.

Please try the following code. Also please look at page 71 of the KiXtart 2001 User Manual (Kix2001.doc)

code:
$CheckPrinter = KeyExist("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\HP LaserJet 5")
If $CheckPrinter
? "Key exists.... end script"
GOTO END
Else
? "Key not found... Script will now launch batch file to install printer."
GOTO InstallPrinter
Endif

:InstallPrinter
Run I43300.BAT
GOTO END

:END
RETURN

Hope this helps...

Top
#21222 - 2002-05-06 10:20 PM Re: Network Printers
Bob Deerinwater Offline
Starting to like KiXtart

Registered: 2002-05-05
Posts: 101
Loc: Covina California
Thanks for your help that works great.. I need to learn a whole lot more abot the coding part of all this... But that will come with time and practice
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
1 registered (Allen) and 363 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.052 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