I am trying to use a TestStand call executable step type to launch a Windows Command Prompt and perform some actions. However, I have found behavior that is different between the command prompt launched by TestStand and the one that is manually launched from Windows. Basically, when I launch a command prompt in TestStand, I cannot seem to be able to access certain folders. What is preventing me from accessing these folders?
When I try to access a path using the Command Prompt launched from TestStand, I receive the following error message: [CMD] The system cannot find the path specified
When using a Call Executable sequence step in TestStand, TestStand will launch a command prompt whose bitness (32-bit or 64-bit) corresponds to that of TestStand's (ie. TestStand 32-bit launches a 32-bit command prompt, and TestStand 64-bit launches a 64-bit command prompt)There are some folders under the %windir% whose access is restricted to applications of a certain bitness. If you happen to be trying to access a file or folder under the %windir%\System32 directory, you may notice that a command prompt launched from 32-bit TestStand might not be able to access some folders or files, even if they exist and can be found via the Windows Explorer or a command prompt launched directly from Windows. The main reason for this behavior is because of the way the Windows File System Redirector works. In a nutshell:
The %windir%\System32 directory is reserved for 64-bit applications.
The %SystemRoot%\SysWOW64 directory is reserved for 32-bit applications.
If the 32-bit command prompt tries to access the %SystemRoot%\System32 directory, the Windows File System Redirector will redirect it to the %SystemRoot%\SysWOW64 folder, which may or may not contain the file or folder trying to be accessed from the command prompt. Hence, this attempt could result in the "The system cannot find the path specified" message.
In the TestStand 32-bit, the solution is to first use a cd command to access the %SystemRoot%\Sysnative from the 32-bit launched command prompt . This will allow the command prompt to navigate the %SystemRoot%\System32 and access files and folders under this path.
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.