Recent

Author Topic: [SOLVED]How to run command from program?  (Read 117 times)

VinDerKlaus

  • New Member
  • *
  • Posts: 27
[SOLVED]How to run command from program?
« on: February 18, 2020, 08:10:56 pm »
Hello,

I try to run "reg add" command, just like you do in cmd, but even though the command works in cmd, it doesn't work in many of the ways that I have tries such as RunCommand. The command includes quotation marks and is actually 2 commands in one line, joined together. What's the most fool-proof way to get a command to work, exactly as it would if it was inputed directly into cmd?

Thank
« Last Edit: February 18, 2020, 09:52:13 pm by VinDerKlaus »

VinDerKlaus

  • New Member
  • *
  • Posts: 27
Re: How to run command from program?
« Reply #1 on: February 18, 2020, 09:51:55 pm »
I found way to enter whole command, no matter how complex - make first parameter of TProcess '/c' - then next parameter can be whole command(s).