ContributionsMost RecentMost LikesSolutionsRe: Rescue Script Repository Thread- Share your scripts A useful thing to do is redirect output from VBS scripts to the console window, i.e. so that instead of say a message box popping up on the screen of the machine to which you are connected you get the output on the chat window in LogMeIn (by redirecting output to the console). There are 2 simple steps: 1) Use a batch file to call the script using 'cscript', format: cscript <VBscript name> 2) Add the VBscript file as a resource file Example (OUTPUT A LIST OF PRINTERS): 1) Create a batch file called printer.bat which contains one line: cscript printer.vbs 2) Create a VBscript file called printer.vbs which contains the following (to enumerate printers): Option Explicit Dim objWMIService, objItem, colItems, strComputer, intPrinters dim sOutput strComputer ="." intPrinters = 1 ' -------------------------------------------- ' Pure WMI Section Set objWMIService = GetObject _ ("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery _ ("SELECT * FROM Win32_Printer") 'Call Wait() ' Goto Sub Routine at the end ' On Error Resume Next For Each objItem In colItems sOutput = sOutput & vbCRLF & objItem.name intPrinters = intPrinters + 1 Next wscript.echo sOutput sub Wait() If strComputer = "." then strComputer = "Local Host" else strComputer = strComputer end if WScript.Echo "Wait 2 mins for " & strComputer _ & " to enumerate printers" End Sub WScript.Quit 3) Add the batch file as the script file and the VBscript file as the resource file. 4) When you DEPLOY you should get a list of the remote printers...