I was referring to upgrading the extender and not WinBatch. Although, WinBatch some very significant improvements since the 2008 version and I think you will notice the difference.
You claim to be getting blank output and yet you show that the rRegSearch function is producing results. Both cannot be the case.
When I run your script as posted against a remote Windows 2003 server I get content that looks like the following
SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AboutTime_is1[DisplayName]@TabSOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AboutTime_is1[DisplayName]...
Perhaps when you say 'blank' you mean that you were expecting to get the data contents of the registry value but that is not how rRegSearch works. As the help file states, the functions returns the "Matching Subkeys and Value Names". In other words, it returns registry paths but not the data content of those paths. You will need to call the RegQueryValue function on each returned registry path. For example, to get the display name of the first item in the list would look something like the following in the context of your script:
strValue = RegQueryValue(handle,ItemExtract(1, retall, @Tab))
But the above will not work if you are not getting the value name you want in each item of your return list. I get the [Displayname] value name in each item of the return list when using your script with the latest version of the extender and the RegQueryValue function returns the contents of the value [Displayname].
33 returned items seems a bit off. I suppose it is possible but I get 378 items in the return list on a system with very little installed software. So, again, go to the download page and check the version number of the current version of the extender against the version you are using.
You have still not stated which version of the extender you are using. Please provide that information...
When you search for the "WindowsInstaller" value instead of the "DisplayName" you are going to get fewer returned items in your list because most installations don't set the value.
Again taking your original script and changing the 'string' variable from "DisplayName" to "WindowsInstaller" and then adding the following:
strValuePath = ItemExtract(1, retall, @Tab)
if RegExistValue(handle,strValuePath)
Data = RegQueryValue(handle,strValuePath)
else
Data = "Value not found"
endif
The Data variable for the first registry path in the list contains the number 1 which is an expected value since it is has the type REG_DWORD.
If by 'working' you mean that the 'list' variable contains the display names of the installed applications on a remote server then your script works just fine for me on a Windows 7 x64 querying a Windows 2003 x86 server.
(using 2015A with full admin privileges)
ddExtender("WWREG34I.DLL")
; Substitution and backslashes don't hurt but arn't necessary.
computername = 'ranger'
;computername = "\\%compname%" ;for REMOTE COMPUTER
;string="DisplayName" ??
topkey=@REGMACHINE ; start at HKEY_CURRENT_USER
topsub="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
handle = RegConnect(computername, topkey)
teststring="DisplayName"
looktype=0 ; look at REG_SZ string values
lookat=2|8 ; look for wholestring matches only, in all registry types: Keys, Values, Data
dosubtree=@True ; do not return subtree contents
retall=rRegSearch(handle,topsub,teststring,looktype,lookat,dosubtree)
list = ""
count=ItemCount(retall,@tab)
For xx = 1 to count
keypath = ItemExtract(xx,retall,@tab)
;newkey = StrReplace(keypath, string, "DisplayName") ;????
if RegExistValue(handle,keyPath)
name = RegQueryValue(handle,keyPath)
list = StrCat(list,@tab,name)
endif
Next
list = StrReplace(StrTrim(list),@tab,@cr)
message("Product list",list)