Originally Posted By: BradV
I think you are missing an assignment. You check Keyexist, but don't store it's value anywhere and then in the next line assume the value is in the variable, $returncode. Try:

 Code:
IF INGROUP ("P_printer_###_***")
   $Returncode = KeyExist("HKEY_CURRENT_USER\Printers\Connections\,,AS-01,printer_###_***\")
   if $Returncode = 0
      ADDPRINTERCONNECTION("\\$ASERVER\printer_###_blanco") ? "printer_###_*** nieuw geinstalleerd"
   endif
else
   $Returncode = Keyexist ("HKEY_CURRENT_USER\Printers\Connections\,,AS-01,printer_###_***\")
   if  $Returncode = 1
      DELPRINTERCONNECTION("\\$ASERVER\printer_###_blanco") ? "printer_###_*** verwijderd"
   endif
endif


You are absolutely right! I have to do the assignment...
_________________________
Still thinking about a good signature