The fixlet script runs with no failure but there is no output to the file. always 0kb
**I can run the vbs script locally on machine and it works fine using the following command. The script captures all installed patches. **
running the script from the command line
//set the variable
Cscript //nologo //h:cscript //s
run installpatch localhost >output.txt
Below is the fixlet. I can run the vbs script below from command line and it works. However i cannot get the output to the file to read. I have tried but run commands below. the vbs script gets created and the output file is created but empty. What am I doing wrong.
// ADD CODE HERE TO CREATE "PATHNAME".
if {not exists folder "C:\BigFixScripts"}
wait cmd.exe /c "md C:\BigFixScripts"
endif
// create installpatch.vbs
createfile until __the_end
strPatches=500
'strPatches=InputBox(vbCRLF & vbCRLF & "Last How Many Patches?")
strComputer=wscript.arguments(0)
Set objSession = CreateObject("Microsoft.Update.Session", strComputer)
Set objSearcher = objSession.CreateUpdateSearcher
Set colHistory = objSearcher.QueryHistory(0, strPatches)
For Each objEntry in colHistory
strList = strList & strComputer & vbTAB & objEntry.Title & vbTAB & objEntry.Date & vbCRLF
Next
I am running a vbs script which works fine on the endpoint using command line.This text will be hidden
wscript.echo strList
__the_end
delete "C:\BigFixScripts\installpatch.csv"
delete {parameter "scriptPath"}\installpatch.vbs
move __createfile {parameter "scriptPath"}\installpatch.vbs
//waithidden cmd.exe /C cscript //B {parameter "scriptPath"}\installpatch.vbs localhost >> C:\BigFixScripts\installpatch.csv
waithidden cmd.exe /Cscript //nologo //h:cscript //s {parameter "scriptPath"}\installpatch.vbs {computer name} > C:\BigFixScripts\installpatch.csv