Here's my quick attempt
 Code:
dim $strServerLocatorPoint
dim $strSiteCode
dim $strSMSInstall
dim $strSMSLogText
dim $strComputer
dim $strSMSClient
dim $errReturnCode

$strServerLocatorPoint = "servername"
$strSiteCode = "sitecode"
$strSMSInstall = "NO"
$strSMSLogText = ""
$strComputer =  "."
$strSMSClient = ""
$errReturnCode = ""

;Read WMI to get state of SMS client
;------------------------------------
;

$objWMIService = GetObject("winmgmts:\\" + $strComputer + "\root\cimv2")
$SMSService = $objWMIService.ExecQuery("SELECT * FROM Win32_Service WHERE DisplayName = 'SMS Agent Host' ")

SMSServiceCheck

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

Exit 0

;*********************************
;*Subroutines & Functions follow *
;*********************************

Function SMSServiceCheck
;------------------
  $errReturnCode = "99"
  For Each $objService in $SMSService
    If $objService.State <> "Running"
      $errReturnCode = $objService.Change( , , , , "Automatic") 
      $errReturnCode = $objService.StartService()
      $strSMSLogText = $objService.Displayname + " restarted from Login Script"
      SMSLogEvent
    Else
      $errReturnCode = $objService.Change( , , , , "Automatic")
    EndIf
  Next
EndFunction


Function SMSInstall
;-------------
  $strSMSClient = "\\" + $strServerLocatorPoint + "\SMSClient\i386\CAPINST.EXE /SLP=" + _
  $strServerLocatorPoint + " /ADVCLI /ADVCLICMD SMSSITECODE=" + $strSiteCode  
  $objShell = CreateObject("WScript.Shell")
  $objShell.Run($strSMSClient)
  $strSMSLogText = "SMS Client installed from Login Script"
  SMSLogEvent
EndFunction


Function SMSLogEvent
;--------------
  $EVENT_SUCCESS = 4
  $objShell = CreateObject("wscript.Shell")
  $objShell.LogEvent($EVENT_SUCCESS, $strSMSLogText)
  $strSMSLogText = ""
EndFunction


Function SMSInstallCheck
;-----------------------
  $HKEY_LOCAL_MACHINE = &80000002
  $strSMSInstall = "NO"
  $strSMSServer = "0"
  $strSMSProductSuite = ""
  $strSMSType = ""
  $strSMSVersion = ""
  $strMIPSvalue = ""
  $strComputer = "."

  ;Lets make sure we only install on WS with no security exceptions

  $objWMIService = GetObject("winmgmts:" + "{impersonationLevel=impersonate}!\\" + $strComputer + "\root\cimv2")
  $colOperatingSystems = $objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem")
  For Each $objOperatingSystem in $colOperatingSystems
    $strSMSServer = InStr($objOperatingSystem.Caption, "Server")
    $strSMSProductSuite = $objOperatingSystem.OSProductSuite
    $strSMSType = $objOperatingSystem.OSType
    $strSMSVersion = Left($objOperatingSystem.Version, 1)
  Next

  ;Check for security Exclusion

  $objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" + $strComputer + "\root\default:StdRegProv")
  $strKeyPath = "SOFTWARE\CSC\EDM\SMS\ClientConfig\Exclusions\MIPS"
  $strEntryName = "ExclusionID"
  $objReg.GetStringValue($HKEY_LOCAL_MACHINE,$strKeyPath,$strEntryName,$strMIPSValue)

  ;Lets work out if we should install a new client
  If $strSMSServer <> "0" or $strSMSProductSuite <> "" or $strSMSType <> "18" or $strSMSVersion = "4" or $strMIPSValue <> ""
    $strSMSInstall = "NO"
  Else  
    $strSMSInstall = "YES"
  EndIf
EndFunction