Why TC12 won't trigger .exe file from "D:\" partition?
Is there any reason why TC12 will not trigger .exe file from "D:\" partition, while the same exe file is being run properly from "C:\" partition? JS is being used as a scripting language, Win10 OS.
For an istance command:
var rootFolderPath = "D:\\TFS TestComplete\\EMSPREREQUISITES\\AdobeReader";
Sys.OleObject("WScript.Shell").Run(rootFolderPath + "\\" + adobeFilePath.Name);
will throw an error:
"Error The system cannot find the file specified. Error location: Unit: "DVS EMS\Post Elections\Script\PrerequisiteInstallation" Line: 18 Column: 34.
The system cannot find the file specified.
Error location:
Unit: "DVS EMS\Post Elections\Script\PrerequisiteInstallation"
Line: 18 Column: 34."
Because it's a shell basically running as a command line, it's possible that the space in the name of the directory is causing the issue. What happens if, as a test, you put your file simply in D:\AdobeReader? Will it work better there?
If so, you might need to wrap your full path in quotes to make sure that the shell executes it properly.
FYI, rather than instantiating the shell as you did, you should be able to use WshShell directly. See
https://support.smartbear.com/testcomplete/docs/reference/program-objects/wshshell/index.html
that is exactly what the issue was. thx - much appriciated!