Cannot run CMD command in Powershell 7

Welcome Forums General PowerShell Q&A Cannot run CMD command in Powershell 7

Viewing 1 reply thread
  • Author
    Posts
    • #217446
      Participant
      Topics: 6
      Replies: 5
      Points: 82
      Rank: Member

      Hi,

      I have installed Robot framework and from the CMD window I can run this command:

      robot –variable username1:Test4 –variable password1:Test4 User.robot

      This command succesfully do its job.

      From the same path, if I try to run these commands in Powershell window:

      robot –variable username1:Test4 –variable password1:Test4 User.robot

      or

      & “cmd.exe” /c robot –variable username1:Test4 –variable password1:Test4 User.robot

      I am getting:

      ‘robot’ is not recognized as an internal or external command, operable program or batch file.

       

      Thank you in advance!

    • #217476
      Participant
      Topics: 3
      Replies: 340
      Points: 1,120
      Helping Hand
      Rank: Community Hero

      Try putting in the full path to robot.

      
      C:\path\to\robot.exe –variable username1:Test4 –variable password1:Test4 User.robot
      
      

      or

      
      & “cmd.exe” /c C:\path\to\robot.exe –variable username1:Test4 –variable password1:Test4 User.robot
      
      

      You can also try invoke-expression. Hope this helps.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.