在ASP中运行cmd命令时出错

时间:2015-12-03 10:57:29

标签: asp-classic

我想从我的ASP页面运行一些命令提示符命令。 我写了这样的东西,它正在发挥作用。

dim wShell1 : Set wShell1 = Server.CreateObject("WScript.Shell")
dim cmd1 : set cmd1 = wShell1.Exec("hostname") 
dim output1 : output1 = cmd1.StdOut.Readall()
response.write(output1)
set cmd1 = nothing
Set wShell1 = nothing 

但是当我将命令从“hostname”更改为“cc c_filename.c”时,它给了我错误。基本上我想从asp代码本身编译这个c文件。 任何人都知道出了什么问题。

我得到的例外是: “WshShell.Exec:系统找不到指定的文件。”

0 个答案:

没有答案
相关问题