|
Hi all,
I have a problem, which I hope someone could help me with. The current network consists out of MS Windows 95 & NT 4.0 clients. The servers are NT 4.0 We are using Mandatory profiles for all users, except the admins. Also all local profiles are being deleted at logoff. At this point everything works fine.
The problem has come, since we are slowly migrating to MS Windows 2000 Pro clients. Everything in the scripts works, only the part of printers doesnt work.
Part of the script: ********************************* If @PRODUCTTYPE = "Windows 2000 Professional" ; Windows 2000 If Len("$Printer") > 0 AND @PRODUCTTYPE = "Windows 2000 Professional" If AddPrinterConnection("$Printer") = 0 Use lpt1 /d Use lpt1 "$Printer" If SetDefaultPrinter("$Printer") <> 0 "." ;* bepaal de naam van de Default printer vanuit de share naam $ShortPrinter = Substr($Printer,3,Len($Printer)-2) $Pos = InStr("$ShortPrinter","\") $PrinterSrv = Substr("$ShortPrinter",1,$Pos-1) $PrinterShare = Substr("$ShortPrinter",$Pos+1,Len($ShortPrinter)-$Pos) $Printerskey = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\$PrinterSrv\Printers" $Index = 0 Do $PrinterName = EnumKey("$PrintersKey",$index) If @ERROR = 0 If ReadValue("$PrintersKey\$PrinterName","Share name") = $PrinterShare $Reval = SetDefaultPrinter("\\$PrinterSrv\$PrinterName") Endif Endif $index = $index + 1 Until Len("$PrinterName") = 0 Endif Endif Endif If Len("$printer2") > 0 If AddprinterConnection("$Printer2") = 0 Use lpt2 /d Use lpt2 "$Printer2" Endif Endif EndIf *************************************************
All help will be apriciated.
Kind Regards, Gilbert van den Andel
|