Kaseya Community

What is wrong with this script?

  • im trying to delete registry keys and values but the else statement seem to need something I dont know what.

  • Line 4 is 'indented' too far (as is line 5 by the look of it).

  • If your intention is just to check for these two keys and delete them if they exsist, get rid of the else. It is not needed. Just have 2 if statements. Line 2 is not indented correctly. Right now it will try to delete the key every time you run the procedure.. Just hit tab on that line to make sure it is inside the if statement.  

    Line 1: IF (no ident)

    Line 2: (hit tab to indent)

    Line 3: IF (no indent)

    Line 4: tabed for indent.