没思考过.NET的问题,只是针对枚举注册表项给个参考:
#Include <Array.au3>
#Include <WinAPIEx.au3>
Global $hKey, $Count, $Num = 1
$hKey = _WinAPI_RegOpenKey($HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\.NETFramework')
$Count = _WinAPI_RegQueryInfoKey($hKey)
Dim $reg_array[1]
For $i = 0 To $Count[0]
If StringRegExp( _WinAPI_RegEnumKey($hKey, $i),'v\d\.\d.*',0) Then
$Num+=1
ReDim $reg_array[$Num]
$reg_array[$Num-1]=_WinAPI_RegEnumKey($hKey, $i)
$reg_array[0]=UBound($reg_array)-1
EndIf
Next
_WinAPI_RegCloseKey($hKey)
_ArrayDisplay($reg_array)
|