Native command error

Abhimanyu Sharma 1 Reputation point
2022-03-15T19:35:49.23+00:00

Run all test suites in this SOAPUI test project and generate an Html-results report.

        cmd.exe /C $TRunner -E $env:APIEnvironment -f $ResultsFolder -R $ReportType -FHTML -I $ProjectFile -A -r -M

Getting this error:
cmd.exe : 'System.__ComObject.GetFile' is not recognized as an internal or external command,
At line:1 char:13

  • cmd.exe /C $TRunner -E $env:APIEnvironment -f $ResultsFol ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : NotSpecified: ('System.__ComOb...ternal command,:String) [], RemoteException
  • FullyQualifiedErrorId : NativeCommandError

operable program or batch file.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,403 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Thameur-BOURBITA 32,596 Reputation points
    2022-03-15T20:50:58.917+00:00

    Hi,

    Do you get the same error when you run the commands below ?

    $action= $TRunner -E $env:APIEnvironment -f $ResultsFolder -R $ReportType -FHTML -I $ProjectFile -A -r -M
    
    cmd.exe /C $action
    

    Please don't forget to mark helpful reply as answer

    0 comments No comments

  2. Limitless Technology 39,421 Reputation points
    2022-03-17T08:14:38.63+00:00

    Hello @Abhimanyu Sharma

    This would be a typical situation if you are running the cmd from Powershell ISE. An error is generated when an EXE writes to stderr, but only within the ISE or when remoting or using background jobs.

    An EXE that writes to stderr does not generate errors from the regular PowerShell command prompt.

    Please try from a regular Powershell session.

    Hope this helps with your query,

    -------------

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments