I'm assuming that you are using MS VBScript for your login scripts. I also believe that you mean the HKCU hive an not the HKLM hive (my HKLM hive was defaulted to 1; yet, the HKCU was at 0).
Anyway...
Code:
Const HKCU = &H80000001 'Registry Hive
Const HKLM = &H80000002 'If you really want HKLM
Dim wshShell
Set wshShell = CreateObject("WScript.Shell")
' Change below to HKLM if you really want it that way
strPath = "HKCU\Software\2x\AppServerClient\SSO"
wshShell.RegWrite strPath,"1","REG_DWORD"
For further login script/vbscript head over to tek-tips.com