07-24-2023, 03:10 AM
I'm not sure what I'm doing wrong...
I want to run a command line tool from an HTA and capture the output to a file so I can process it after...but it's not writing any file...
If I type `adb devices > c:\adb.txt` into the Windows Command Prompt, it works, but if I use the following JScript code in the HTA, the adb program runs, I get a return code of 0, but no output file is created.
var oShell = new ActiveXObject("WScript.Shell");
var runcmd = "adb devices > c:\\adb.txt";
var oExec = oShell.Run(runcmd, 0, true);
Is there something wrong with my script that I'm missing?
I want to run a command line tool from an HTA and capture the output to a file so I can process it after...but it's not writing any file...
If I type `adb devices > c:\adb.txt` into the Windows Command Prompt, it works, but if I use the following JScript code in the HTA, the adb program runs, I get a return code of 0, but no output file is created.
var oShell = new ActiveXObject("WScript.Shell");
var runcmd = "adb devices > c:\\adb.txt";
var oExec = oShell.Run(runcmd, 0, true);
Is there something wrong with my script that I'm missing?