#211157 - 2016-03-04 05:44 PM
get xml version
|
BradV
Seasoned Scripter
Registered: 2006-08-16
Posts: 686
Loc: Maryland, USA
|
I didn't find a script in the UDF library. So, I started writing one. I'm having a problem with it on Windows 2008 R2 servers. The EnumValue doesn't seem to work even though I can see the value in regedit.
Function GetXMLVersion(optional $strComputer)
DIM $strKey, $intIndex, $intI, $strValName, $arrVer[10]
If $strComputer = ""
$strComputer = "."
EndIf
;
$strKey="\HKEY_CLASSES_ROOT\CLSID\{2933BF90-7B36-11D2-B20E-00C04F983E60}\VersionList"
$intIndex = 0
$intI = 0
If KeyExist("\\" + $strComputer + $strKey)
$strValName = EnumValue("\\" + $strComputer + $strKey, $intIndex)
While Not @ERROR
If $strValName <> "(Default)"
; Want to ignore the Default entry
$arrVer[$intI] = $strValName
$intI = $intI + 1
EndIf
$intIndex = $intIndex + 1
$strValName = EnumValue("\\" + $strComputer + $strKey, $intIndex)
Loop
EndIf
; To mark the end of the array, place a -1 in the next array position.
$arrVer[$intI] = -1
$GetXMLVersion = $arrVer
EndFunction It works fine on 32 bit Windows Server 2003.
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 504 anonymous users online.
|
|
|