vbscript - Trying to press keys and shortcuts in a hidden CMD window -
i trying create script use copy con
write file
set objnetwork = createobject("wscript.network") currentuser = objnetwork.username set wshell = createobject("wscript.shell") wshell.run "%comspec% cd c:\users\" & currentuser & _ "\appdata\roaming\microsoft\windows\start menu\programs\startup & copy con master.vbs & x = 1 & x=2^z", 0, true
the problem here while using ^z
simulate output of crtl+z, cmd doesn't treat them same.
as can see, wanted console window hidden, using sendkeys
won't work here.
any suggestions?
Comments
Post a Comment