使用运行命令时,复制con不起作用

时间:2017-08-14 15:03:32

标签: cmd vbscript

我尝试编写将文件写入用户启动文件夹的代码。

Set Wshell = CreateObject("WScript.Shell")

Wshell.Run "%COMSPEC% cd \c AppData\Roaming\Microsoft\Windows\Start 
Menu\Programs\Startup & copy con master.vbs & x = 1 & x=2^Z",0,True

P.S。我使用cd appdata,因为cmd的默认启动文件夹是C:\ Users \ [Username],启动文件夹的位置是

C:\Users\Appdata\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

0 个答案:

没有答案