首先,抱歉英语不好。 我将Classic ASP用于网络上的简单事情。我希望用户在我们的Intranet页面上查看其域密码过期日期。 Intranet页面运行经典的ASP。
在CMD或Powershell上
function(x,y,z){
...
}
let *args = ["one", "two", "three"];
function(...*args)
**or more dynamically as**
function(inputs<T>:Array){
for(index in inputs){
console.log(inputs[index]);
}
}
let *args = ["one", "two", "three"];
function(*args)
命令给出结果。在ASP页面上,我需要运行此命令并读取密码过期日期的结果。 你能帮我吗? 谢谢。
答案 0 :(得分:0)
如果将输出重定向到文本文件,则可以从asp读取文件:
Set w = Server.CreateObject("WScript.Shell")
w.Run "cmd /c net user > c:\temp\output.txt", 0, true ' send output into file
Set s = CreateObject("Scripting.FileSystemObject")
Set f = s.OpenTextFile("c:\temp\output.txt", 1) ' read file
o = f.ReadAll
f.Close
response.write o
当然,这将需要访问asp帐户才能执行给定命令,并且 对文件的读/写访问。