Dear,

Try following script and return the output of file c:\kixdebug.log on
the board.
code:
                                            CLS
COLOR C+/N
AT (1,1) " "
IF RedirectOutput("c:\kixdebug.log")
ENDIF
? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/3.04e script starting."
? "-"
? "-curdir: "+LCASE(@curdir)
? "-scriptdir: "+LCASE(@scriptdir)
IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0)
? "-scriptname: "+LCASE(@scriptname)
ENDIF
? "-startdir: "+LCASE(@startdir)
? "-"
? "-userid: "+LCASE(@userid)+"/"+LCASE(@wuserid)
? "-user priv: "+LCASE(@priv)
IF (instr("-4.xx-","-"+substr(@kix,1,2)+"xx-") <> 0)
? "-version: inwin="+@inwin+"/dos="+@dos"/productsuite="+@productsuite+"/producttype="+@producttype"/csd="+LTRIM(RTRIM(@csd))
ELSE
? "-version: inwin="+@inwin+"/dos="+@dos
ENDIF
? "-"
?"- start-"+@time+"- @error @serror "?

?"- 1-"+@time+"- @error @serror "? IF @producttype = "Windows 2000 Professional" ; Windows 2000
?"- 2-"+@time+"- @error @serror "? IF Len("$Printer") > 0 AND @producttype = "Windows 2000 Professional"
?"- 3-"+@time+"- @error @serror "? IF AddPrinterConnection("$Printer") = 0
?"- 4-"+@time+"- @error @serror "? USE lpt1 /d
?"- 5-"+@time+"- @error @serror "? USE lpt1 "$Printer"
?"- 6-"+@time+"- @error @serror "? IF SetDefaultPrinter("$Printer") <> 0
?"- 7-"+@time+"- @error @serror "? "." ;* bepaal de naam van de Default printer vanuit de share naam
?"- 8-"+@time+"- @error @serror "? $shortprinter = Substr($printer,3,Len($printer)-2)
?"- 9-"+@time+"- @error @serror "? $pos = InStr("$ShortPrinter","\")
?"- 10-"+@time+"- @error @serror "? $printersrv = Substr("$ShortPrinter",1,$pos-1)
?"- 11-"+@time+"- @error @serror "? $printershare = Substr("$ShortPrinter",$pos+1,Len($shortprinter)-$pos)
?"- 12-"+@time+"- @error @serror "? $printerskey = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\$PrinterSrv\Printers"
?"- 13-"+@time+"- @error @serror "? $index = 0
?"- 14-"+@time+"- @error @serror "? DO
?"- 15-"+@time+"- @error @serror "? $printername = EnumKey("$PrintersKey",$index)
?"- 16-"+@time+"- @error @serror "? IF @error = 0
?"- 17-"+@time+"- @error @serror "? IF ReadValue("$PrintersKey\$PrinterName","Share name") = $printershare
?"- 18-"+@time+"- @error @serror "? $reval = SetDefaultPrinter("\\$PrinterSrv\$PrinterName")
?"- 19-"+@time+"- @error @serror "? ENDIF
?"- 20-"+@time+"- @error @serror "? ENDIF
?"- 21-"+@time+"- @error @serror "? $index = $index + 1
?"- 22-"+@time+"- @error @serror "? UNTIL Len("$PrinterName") = 0
?"- 23-"+@time+"- @error @serror "? ENDIF
?"- 24-"+@time+"- @error @serror "? ENDIF
?"- 25-"+@time+"- @error @serror "? ENDIF
?"- 26-"+@time+"- @error @serror "? IF Len("$printer2") > 0
?"- 27-"+@time+"- @error @serror "? IF AddPrinterConnection("$Printer2") = 0
?"- 28-"+@time+"- @error @serror "? USE lpt2 /d
?"- 29-"+@time+"- @error @serror "? USE lpt2 "$Printer2"
?"- 30-"+@time+"- @error @serror "? ENDIF
?"- 31-"+@time+"- @error @serror "? ENDIF
?"- 32-"+@time+"- @error @serror "? ENDIF
?"- 33-"+@time+"- @error @serror "?

?"- end-"+@time+"- @error @serror "?
? "-"
? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/3.04e script ending."
? "-"
IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0)
? "-"+@cpu+" ("+@mhz+" Mhz, memory "+MemorySize()+" MB)"
ENDIF

greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA