We are trying to deploy applications via group membership (unfortunately we are still in an NT environment). Our applications when installed write a key to the registry under HKLM+"\Software\Veritas\Wininstall\Applications\appname. I can do an arrayenumkey on all the keys but am have trouble trying to split the output out again (if you get what I mean). Anyway, I have included the code of what I am attempting to do and any help would be appreciated.
Code:
$regkey=(HKLM+"\Software\Veritas\Wininstall\Applications")
$applist=ArrayEnumKey($regkey)
For Each $appname In $applist
;This is where I am stuck
Next
;Install the application if you are a member of the install group and the application does not exist
If InGroup("APP-MSFT-MSActSync") AND NOT Exist ($regkey+"\"+$appname)
? "Installing MS ActiveSync"
Else
;Uninstall the application if it is installed and you are not a member of the install group
If NOT InGroup("APP-MSFT-MSActSync") AND Exist ($regkey+"\"+$appname)
? "Uninstalling MS ActiveSync"
EndIf
EndIf
Cheers,
Grasshopper75