torus
2 years agoContributor
How do you run executable utility from the command line that requires parameters?
nothing has worked. I've tried everything but nothing is working:
function testme()
{
Run_CommandLineExecutable("KillBrowserDrivers", "KillBrowserDrivers.exe", "chrome msedge");
}
function Run_CommandLineExecutable(folderName, executableName, arguments)
{
var projectPath = Project.Path;
var utilityPath = projectPath + `_UTILITIES_\\${folderName}\\${executableName}`;
var fileExists = aqFile.Exists(utilityPath);
utilityPath = utilityPath + ` ${arguments}`;
//WshShell.Run("powershell " + utilityPath);
//var shell= Sys.OleObject("WScript.Shell");
//var result = shell.Run(utilityPath);
var returnval = Sys.OleObject("WScript.Shell").Exec(`cmd notepad.exe`); //${utilityPath}`);
var puasehere= 23;
}
Hi,
> nothing has worked.
Quite often a piece of additional information like what exactly was expected, what was the actual result and any additional related information might help with guessing about one's actual problem.
Doesn't https://support.smartbear.com/testcomplete/docs/reference/program-objects/wshshell/index.html and related https://support.smartbear.com/testcomplete/docs/testing-with/advanced/using-external-functions/running-powershell-scripts.html help articles help?