Forum Discussion

avidCoder's avatar
avidCoder
Super Contributor
5 years ago
Solved

Java.io.IOException - Cannot run program "C:\Program": CreateProcess error=2

Please look into the below code:-   def command = "C:\\Program Files\\PuTTY\\putty.exe -ssh servername -l username -pw password" def proc = command.execute() proc.waitFor() This code works in ...
  • HimanshuTayal's avatar
    5 years ago

    Hi avidCoder ,

     

    Not sure can you try with installing your PUTTY in D drive or to a folder have no spaces in filepath

     

    like below one with no space in whole path:

    D:\\PuTTY\\putty.exe -ssh servername -l username -pw password"