#41881 - 2003-06-20 04:57 PM
UDF and Function Question
|
Grasshopper75
Getting the hang of it
Registered: 2002-01-15
Posts: 99
Loc: Melbourne, Australia
|
Can you have a function within a function or should I create a separate script with the UDF code in it and call the UDF from within my main script ?
Grasshopper75
|
|
Top
|
|
|
|
#41883 - 2003-06-20 05:06 PM
Re: UDF and Function Question
|
Grasshopper75
Getting the hang of it
Registered: 2002-01-15
Posts: 99
Loc: Melbourne, Australia
|
I'm trying to figure out the ArrayEnumKey() UDF and don't quite understand what I need to do with it.
I'm trying to enumerate all the NIC cards in the reg key HKLM\System\CurrentControlSet\Services\NetBT\Adapters\
Grasshopper75
|
|
Top
|
|
|
|
#41884 - 2003-06-20 05:08 PM
Re: UDF and Function Question
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Wouldn't you need to do something like a comparison?
That is -
code:
if $currentsubkey = "value" ;do something else ;do something else endif
Kent [ 20. June 2003, 17:10: Message edited by: kdyer ]
|
|
Top
|
|
|
|
#41887 - 2003-06-20 05:16 PM
Re: UDF and Function Question
|
Grasshopper75
Getting the hang of it
Registered: 2002-01-15
Posts: 99
Loc: Melbourne, Australia
|
I need to enumerate all the subkeys and then write a value to each subkey to clear WINS entries.
The subkeys are different on each machine and some machines have multiple subkeys which is why I need to use the ArrayEnumKey UDF.
|
|
Top
|
|
|
|
#41889 - 2003-06-20 05:25 PM
Re: UDF and Function Question
|
Grasshopper75
Getting the hang of it
Registered: 2002-01-15
Posts: 99
Loc: Melbourne, Australia
|
Sorry sealeopard, I was writing the post as you posted your reply. Thanks, I will give it a go.
|
|
Top
|
|
|
|
#41890 - 2003-06-20 06:47 PM
Re: UDF and Function Question
|
Grasshopper75
Getting the hang of it
Registered: 2002-01-15
Posts: 99
Loc: Melbourne, Australia
|
Thanks everyone, I have now got it working
Cheers, Grasshopper75
|
|
Top
|
|
|
|
#41891 - 2003-06-21 03:49 AM
Re: UDF and Function Question
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11634
Loc: Space
|
I tried your code Jens... but it did not work.
Was missing the ) on the end of the line.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 384 anonymous users online.
|
|
|