Hi,

I builded the following script. There are several mistakes in it. And it need some adjustment.

** I want to set a Default printer. (hplj4250TN_PCL6)
** When the printers are already installed. Skip the printers in the script

 Code:
;*************************************************************************
;***                        Main logonscript!                          ***
;*************************************************************************

;**********************************************
;Aanmaken van logbestanden
;**********************************************

$DUMMY=SETTITLE("Loginscript")
CLS
? "Momentje  Roy, uw loginscript wordt uitgevoerd..."

? "Algemene netwerkkoppelingen worden aangemaakt..."
;*********************************************************
;Netwerk koppelingen
;*********************************************************

;Public data K:
Use J: /DEL
Use J: "\\*******SERVER*******\Company" /PERSISTENT

;Public data L:
Use J: /DEL
Use J: "\\*******SERVER*******\Company\Documenten" /PERSISTENT

? "Printers"
;*********************************************************
;Printers
;*********************************************************

;installation of printers
? "Printers installeren"
IF @INWIN=1 
	IF READVALUE("HKEY_CURRENT_USER\SOFTWARE\CEXP\Printer","Installatie")<>"3"
	$DUMMY=ADDPRINTERCONNECTION("\\******SERVER******\hpclp3600")
	$DUMMY=ADDPRINTERCONNECTION("\\******SERVER******\HPLaserJ")
	$DUMMY=ADDPRINTERCONNECTION("\\******SERVER******\hplj4100")
	$DUMMY=ADDPRINTERCONNECTION("\\******SERVER******\hplj4250tnplc6")
	$DUMMY=ADDPRINTERCONNECTIOn("\\******SERVER******\samsung_clp510")
	$DUMMY=ADDPRINTERCONNECTION("\\******SERVER******\XeroxWCM")

RETURN


Can someone help me please?


Edited by ThaSySman (2009-03-04 12:13 PM)