Troubleshooting

From Jesse's Wiki
Revision as of 23:30, 28 April 2021 by Jesse (talk | contribs) (HTA and vbscript troubleshooting)
Jump to navigation Jump to search

This page aims to record the solutions to obscure problems.

GitHub

To delete a release, do not click on "Edit", instead click the release title name. Then the "Delete" button will be available.

Citrix

Use the web version when possible. To download a file, use the "download" icon which should appear. It may not be possible to use the Windows Explorer interface anymore.

HTA

When using HTA to open a vbscipt with cscript.exe, you can communicate directly with the script using the Stdout property. So long as the script was launched using shell.exec method. shell.run method is acceptable but it only returns an error level.

exec method to work needs to have the shell set to an object. blah = shell.exec ( blah blah). Then use blah.Stdout.ReadLine() or ReadAll().

This seems most useful for quick scripts where I want to return a single value. I can't seem to get live updates synchronously with the script as described here

It would be better to have live read outs update to the HTA so the console screen can be avoided entirely, giving the HTA a more "program" feel.


This explains when you want the window to stay open, e.g. use pause for the "press any key to continue" or just keep it alive until they click on the x.


Okay apparently using setInterval in the HTA will allow me to read the Stdout without locking the application...

       setInterval(function(){ document.getElementById(6).innerHTML = blah.StdOut.ReadLine(); }, 1000);

MSDN


But now I can't run the shell minimized or stop it from taking focus.