Page 1 of 1 1
Topic Options
#112285 - 2004-01-22 07:59 PM Help with Arrays please
Grasshopper75 Offline
Getting the hang of it

Registered: 2002-01-15
Posts: 99
Loc: Melbourne, Australia
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

Top
#112286 - 2004-01-22 08:08 PM Re: Help with Arrays please
Grasshopper75 Offline
Getting the hang of it

Registered: 2002-01-15
Posts: 99
Loc: Melbourne, Australia
I have just discovered the KeyExist function so will incorporate that into my script also.
Top
#112287 - 2004-01-22 08:42 PM Re: Help with Arrays please
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
What does have KEYEXIST() to do with splitting output? And what exactly do you want to split, anyway?
_________________________
There are two types of vessels, submarines and targets.

Top
#112288 - 2004-01-22 09:24 PM Re: Help with Arrays please
Grasshopper75 Offline
Getting the hang of it

Registered: 2002-01-15
Posts: 99
Loc: Melbourne, Australia
I cant explain it coz I dont think I know what I am trying to do myself.. I am very lost at the moment.
Top
#112289 - 2004-01-22 09:32 PM Re: Help with Arrays please
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
To do what you are trying to do, don't you need a reference list of required apps for each group? (I am guessing here.)
_________________________
Jack

Top
#112290 - 2004-01-22 09:35 PM Re: Help with Arrays please
Grasshopper75 Offline
Getting the hang of it

Registered: 2002-01-15
Posts: 99
Loc: Melbourne, Australia
You're exactly right but I only figured that out after 2 hours !! I'm having a bad day !! I'm trying a different way now.
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1471 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.056 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org