cmd - Paste but don't execute command in Windows command prompt -
my target show windows command prompt , display command on command line without executing it. therefore, if want display command echo hello
, want command prompt started , display:
c:\windows\system32>echo hello_
... _ blinking cursor waiting user press key.
to accomplish this, i've tried either create shortcut windows command prompt executable, has "target" changed to: c:\windows\system32\cmd.exe ...
or bat file containing:
cmd.exe /k ...
... /k stands for:
/k : carries out command specified string , continues
this makes command prompt continue live , not terminate way /c switch acts.
any idea how achieve result?
you can't achieve want cmd
alone. done vbscript, though.
set sh = createobject("wscript.shell") sh.run "%comspec% /k @title mycmd" sh.appactivate "mycmd" sh.sendkeys "echo hello"
Comments
Post a Comment