Hi im new on your forum , and noob with Kix...so,i'm suppose to change the printer by the WKS classroom type with the printer...so if a WKS is in classroom 604 , it's suppose to be connected with printer X and if in 705 , printer Y..etc...etc...
Here's an example of the old script and what i change inside , but don't work properly , block at 45% loading...
Finally excuse my english , im from belgium and don't practice too much my english... 
Here's the OLD version of my script:
Code:
;********imprimantes****************
$Percent =45
$StatusMessage = $statmsg6
Gosub Progress
if $wksType<>"PTP"
$defptr="\\PTP"+substr(@DOMAIN,3,4)+$ccmid+$pool+"1\HP LaserJet 2100 Series PCL 6,winspool,Ne00:"
writevalue("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows","Device",$defptr,"REG_SZ")
else
$defptr="\\PTP"+substr(@DOMAIN,3,4)+$ccmid+$pool+"1\HP LaserJet 2100 Series PCL 6,winspool,LPT1:"
writevalue("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows","Device",$defptr,"REG_SZ")
endif
if @error<>0
$17="Mapping HP Laser"
endif
if ingroup ("GB-Eleves")
select
case $pool=0
gosub "Printer_Pool1"
case $pool=1
gosub "Printer_Pool2"
case $pool=3
gosub "Printer_Pool3"
endselect
if $wksType="PTE"
shell "cmd /c rd d:\temp /s /q"
md d:\temp
endif
$Percent =50
Gosub Progress
endif
if ingroup ("GB-Professeurs") Or ingroup ("GB-PersRessources") Or ingroup ("Administrateurs")
if $wksType="PTE" or $wksType="PTP"
select
case $pool=0
gosub "Printer_Pool1"
case $pool=1
gosub "Printer_Pool2"
case $pool=3
gosub "Printer_Pool3"
endselect
$Percent =50
Gosub Progress
endif
if $wksType="PTD" or $wksType="PTM"
$laser1="PRL"+substr(@DOMAIN,3,4)+$ccmid+"01"
$laser2="PRL"+substr(@DOMAIN,3,4)+$ccmid+"11"
$srvQL1="\\PTP"+substr(@DOMAIN,3,4)+$ccmid+"01\"+$laser1
$srvQL2="\\PTP"+substr(@DOMAIN,3,4)+$ccmid+"11\"+$laser2
$srvQL=$srvQL1
gosub "Printer_Pool1"
$srvQL=$srvQL2
gosub "Printer_Pool2"
$Percent =50
Gosub Progress
endif
gosub "Printer_Color"
$Percent =55
Gosub Progress
endif
$Percent =60
$StatusMessage = $statmsg7
Gosub Progress
As i need ot connect 5 printer for spécifics classroom , here's what i did:
New code:
Code:
;********imprimantes****************
$Percent =45
$StatusMessage = $statmsg6
Gosub Progress
if $wksType<>"PTP"
$defptr="\\PTP"+substr(@DOMAIN,3,4)+$ccmid+$pool+"1\HP LaserJet 2100 Series
PCL 6,winspool,Ne00:"
writevalue("HKEY_CURRENT_USER\Software\Microsoft\Windows
NT\CurrentVersion\Windows","Device",$defptr,"REG_SZ")
else
$defptr="\\PTP"+substr(@DOMAIN,3,4)+$ccmid+$pool+"1\HP LaserJet 2100 Series
PCL 6,winspool,LPT1:"
writevalue("HKEY_CURRENT_USER\Software\Microsoft\Windows
NT\CurrentVersion\Windows","Device",$defptr,"REG_SZ")
endif
if @error<>0
$17="Mapping HP Laser"
endif
if ingroup ("GB-Eleves")
select
case $pool=0
gosub "Printer_Pool1"
case $pool=1
gosub "Printer_Pool2"
case $pool=3
gosub "Printer_Pool3"
endselect
if $wksType="PTE"
shell "cmd /c rd d:\temp /s /q"
md d:\temp
endif
************ SCRIPT MODIFIE PAR BALAFRUS ***********************
if $wksType<>"PTE0604"
$defptr="\\PTP7002A01\HP LaserJet 2100 Series
PCL 6,winspool,Ne00:"
writevalue("HKEY_CURRENT_USER\Software\Microsoft\Windows
NT\CurrentVersion\Windows","Device",$defptr,"REG_SZ")
endif
if $wksType<>"PTE0605"
$defptr="\\PTP7002A11\HP LaserJet 2100 Series
PCL 6,winspool,Ne00:"
writevalue("HKEY_CURRENT_USER\Software\Microsoft\Windows
NT\CurrentVersion\Windows","Device",$defptr,"REG_SZ")
endif
if $wksType<>"PTE0705"
$defptr="\\PTE0705A06\HP705,winspool,Ne00:"
writevalue("HKEY_CURRENT_USER\Software\Microsoft\Windows
NT\CurrentVersion\Windows","Device",$defptr,"REG_SZ")
endif
if $wksType<>"PTE0706"
$defptr="\\PTE0705A06\HP705,winspool,Ne00:"
writevalue("HKEY_CURRENT_USER\Software\Microsoft\Windows
NT\CurrentVersion\Windows","Device",$defptr,"REG_SZ")
endif
***************************************************************
Please excuse me if i make a forum mistake ....im noob... 
And if u can bring me to light with this script....thanks a lot !
BAL.