VMware Cloud Community
SamWolf
Enthusiast
Enthusiast

Windows Command Execution

Hello,

I am running into some issues attempting to run command line executable from my VCO server.

I am running the application on windows 2012 R2 Server and when attempting to run functions leveraging the "Command" scripting class.

Executables that are fully functional from the actual server command line such as "rd /Q /S C:/test/" error out with

Wrapped java.io.IOException: Cannot run program "rd": CreateProcess error=2, The system cannot find the file specified (Workflow:File Write Testing / Scriptable task (item1)#5)

Any help resolving this would be greatly appreciated.

Thanks,

Reply
0 Kudos
2 Replies
sbeaver
Leadership
Leadership

Can you post your code and relevant parts of the workflow you are using to get to that point?  Based on what you have written in the post I am thinking you need to put the path of powershell as the command and there are different ways to send the commands or scripts.  Lets see what you have in place and then we can go from there

Steve Beaver
VMware Communities User Moderator
VMware vExpert 2009 - 2020
VMware NSX vExpert - 2019 - 2020
====
Co-Author of "VMware ESX Essentials in the Virtual Data Center"
(ISBN:1420070274) from Auerbach
Come check out my blog: [www.virtualizationpractice.com/blog|http://www.virtualizationpractice.com/blog/]
Come follow me on twitter http://www.twitter.com/sbeaver

**The Cloud is a journey, not a project.**
SamWolf
Enthusiast
Enthusiast

thanks for the reply.

Structuring the cmds with

cmd /c "rd /Q /S C:\test\"

Did the trick

Reply
0 Kudos