You should also remove the space from both endif's in this part of the script.

 Code:
If $errReturnCode <> "0"
    SMSInstallCheck
    If $strSMSInstall = "YES"
	SMSInstall
    end If
Else
    $SMSService = $objWMIService.ExecQuery("SELECT * FROM Win32_Service WHERE DisplayName = 'SMS Remote Control Agent' ")
    SMSServiceCheck
End If
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.