- Option Explicit
-
- Dim fso,objShell,strCmd
- Set fso = CreateObject("Scripting.FileSystemObject")
- if (fso.fileexists("c:\Test_mklink\cs2\cstrike.exe")) then fso.DeleteFile("c:\Test_mklink\cs2\cstrike.exe")
- Set objShell = CreateObject("Wscript.Shell")
-
- strCmd = "mklink"
- strCmd = strCmd & " "
- strCmd = strCmd & Chr(34) & "c:\Test_mklink\cs2\cstrike.exe" & Chr(34)
- strCmd = strCmd & " "
- strCmd = strCmd & Chr(34) & "c:\Test_mklink\cs1\cstrike.exe" & Chr(34)
-
- 'Wscript.echo strCmd
- 'InputBox "", "", strCmd
- objShell.Run strCmd
复制代码 以上代码在win10运行提示“系统找不到指定的文件” 代码:80070002 源:(null)
我在管理员命令提示符下运行同样错误。请问怎么修改? |