Sorry sorry
Ok, ive ran some tests.
Now my code looks like this:


    Lpt1Printer()
    Function Lpt1Printer()
    Dim $index2,$KeyName,$KeyValue

    $index2 = 0

    :loopprinters

    $KeyName = EnumKey("HKLM\System\CurrentControlSet\control\Print\Printers",$index2)
    $KeyValue = ReadValue("HKLM\System\CurrentControlSet\control\Print\Printers\$keyname","Port")

    If @error=0
    ? "$KeyName"
    @CRLF
    ? "$KeyValue"
    @CRLF
    If InStr("$KeyValue","LPT1")
    ? "lpt1 found, setting default..."
    $=SetDefaultPrinter("$KeyName")
    @CRLF
    @SERROR
    @CRLF
    ? "$KeyName"
    @CRLF
    $NietVerder = 1
    Return
    EndIf
    Else
    Return
    EndIf
    $index2=$index2+1
    GoTo loopprinters

    EndFunction

    If $NietVerder = 1
    ? "Lpt1 found, dont look for network printers."
    Else
    ? "install network printer"
    EndIf


But if i run the code for different users on the same pc, the script will see the reg key and say that it has found the lpt1 printer. But when you check the printer list, it will not be standaard... The script only sets the local printer default for the person who installed it...

Any ideas how to set the local printer default for every user who logs on the pc?