WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

How To
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

List Applications Installed on Remote Machines


AddExtender("WWREG34I.DLL")
AddExtender("WWWNT34i.DLL")

; get a list of machines on the network
machinelist=wntServerList("","",1)

;For each machine
pccount=ItemCount(machinelist,@tab)
for xx=1 to pccount
	thispc=ItemExtract(xx,machinelist, @tab)
	ErrorMode(@OFF)
	; connect to the remote computer
	topkey=RegConnect(thispc,@REGMACHINE)
	ErrorMode(@CANCEL)
	if topkey == 0 then continue ;skip if cannot connect	
	
	; get list of installed software from the remote registry
	teststring="DisplayName"
	topsub="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
	
	looktype=0              ; look at REG_SZ string values
	lookat=2|8              ; Value Names | Match wholestring only
	dosubtree=@TRUE         ; recurse subtree contents
	retall=rRegSearch(topkey,topsub,teststring,looktype,lookat,dosubtree)
	
	count=ItemCount(retall,@tab)
	applist = ""
	For yy = 1 to count
		 keystring = ItemExtract(yy,retall,@tab)
		 type = RegEntryType(topkey,keystring)
		 app = RegQueryEx(topkey,keystring,"",type)
	    ;Include uninstall path
		 Applist = Strcat(applist, @TAB, app )
	Next
	applist = strtrim(applist)
	AskItemList(StrCat(thispc," - Installed Software Found ",count," Entries"),applist,@tab,@sorted,@single)

Next

Article ID:   W15989
File Created: 2004:03:30:15:42:08
Last Updated: 2004:03:30:15:42:08