All he is doing is making sure that $Key is blank however not really needed in this case.

Yes, there are many ways to skin a cat. Here is his code re-written (NOT TESTED)
 
Code:
Dim $sComputer,$ServerCheck,$Set,$File,$RunValue
$RunValue='LogonApp.exe http://192.168.61.12:15880/websense /PERSIST'
$ServerCheck=ReadValue('HKLM\SYSTEM\CurrentControlSet\Control\ProductOptions','ProductType')
If $ServerCheck='WinNT'
If Not ReadValue('HKLM\Software\Microsoft\Windows\CurrentVersion\Run','LoginAgent')
;COPY "\\artemis\loginapp.exe" "c:\loginapp.exe"
;Think the above is a typo
COPY "\\artemis\logonapp.exe" "c:\logonapp.exe"
;$Set=WriteValue('HKLM\Software\Microsoft\Windows\CurrentVersion\Run','LoginAgent',$RunValue,REG_SZ)
;Unless the user has local admin rights they won't be able to write to HKLM
$Set=WriteValue('HKCU\Software\Microsoft\Windows\CurrentVersion\Run','LoginAgent',$RunValue,REG_SZ)
EndIf
If Not Exist('c:\LogonApp.exe')
Copy @LSERVER+'\netlogon\LogonApp.exe' 'c:\LogonApp.exe'
EndIf
EndIf