Archive: How to call and make silent a CMD window, feed it a command and exit at runtime?


How to call and make silent a CMD window, feed it a command and exit at runtime?
Hello,

I am using the following command at compile time to help move files out of the way of a recursive spidering.

!system '"CMD/C|MOVE /Y "C:\filepath\file.ext" "C:\bank\file.ext"'

This is great but unfortunately it's only for compile time. What is the run time equivalent command? I am having trouble getting it right.

I've tried nsExec, Exec, ExecWait but I am convinced I must have the styling of the line wrong or something. This is quite easy to do with a .bat file but I am hoping there is a way to tell NSIS at uninstall to call a cmd, feed it a command and exit.

I know this has to be possible but just don't know how, can someone help me out?

Thanks!


You can use the Rename instruction. No need for executing an external program.