Hey guys, just started using Kixtart today and having some n00b troubles.

Basically I want to accomplish this:

IF specific registry folder does NOT exist

END

BUT IF registry folder DOES exist

RUN COMMAND

Here's what I have so far:

 Code:
If Not Exist("HKEY_CURRENT_USER\SOFTWARE\Citrix")
End

If KeyExist("HKEY_CURRENT_USER\SOFTWARE\Citrix\Program Neighborhood Agent\Config URL")
  ; Delete Key
  DelValue("HKEY_CURRENT_USER\SOFTWARE\Citrix\Program Neighborhood Agent", "Config URL")
Else
  AddKey("HKEY_CURRENT_USER\SOFTWARE\Citrix\Program Neighborhood Agent\Config URL")
  WriteValue("HKEY_CURRENT_USER\SOFTWARE\Citrix\Program Neighborhood Agent\Config URL","Enabled",
    "http://xxx.xxx.xxx.xxx/Citrix/PNAgent/config.xml", "REG_SZ")
  

If KeyExist("HKEY_CURRENT_USER\SOFTWARE\Citrix\Program Neighborhood Agent\Application Cache")
   ; Delete Key
   DelValue("HKEY_CURRENT_USER\SOFTWARE\Citrix\Program Neighborhood Agent", "Application Cache")
Else
   AddKey("HKEY_CURRENT_USER\SOFTWARE\Citrix\Program Neighborhood Agent\Application Cache")
   WriteValue("HKEY_CURRENT_USER\SOFTWARE\Citrix\Program Neighborhood Agent\Application Cache","Enabled",
    "C:\Documents and Settings\%username%\Application Data\Citrix\PNAgent\AppCache", "REG_SZ")

; can check for status??
EndIf


I feel like I'm right there... just can't figure out the logic.

Thanks.


Edited by Glenn Barnas (2009-11-19 01:23 AM)
Edit Reason: code tags, long line