我正在尝试将现有系统从Windows XP Professional/IIS 5.1升级到Windows 7旗舰版(32位)/ IIS 7.5.原始系统运行了一个经典的ASP网站(仅适用于localhost),该网站使用"ASPExec"在本地计算机上启动桌面应用程序(.bat,.cmd,.exe等).在Windows 7 Ultimate/IIS 7.5下,应用程序无法从ASP页面启动.
作为测试(最终目标不是启动记事本),我尝试过:
<%
Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "notepad.exe"
Executor.ShowWindow = True
strResult = Executor.ExecuteWinApp
%>
Run Code Online (Sandbox Code Playgroud)
我也尝试过:
<%
Set wshell = CreateObject("WScript.Shell")
wshell.run "notepad.exe"
Set wshell = Nothing
%>
Run Code Online (Sandbox Code Playgroud)
这两种方法都会导致notepad.exe显示在Windows进程列表中,但无法在桌面上启动应用程序.对于我尝试运行的任何.exe都是如此,而.bat或.cmd文件根本无法执行任何操作.
在IIS 5.1中,ASP应用程序的原始作者使用"IIS Admin"服务和"World Wide Web Publishing"服务上的"允许服务与桌面交互"选项来实现此功能.除了允许桌面交互式服务之外的所有问题,IIS 7不再使用"IIS Admin"服务,因此这不是一个选项.
我正在寻找Windows/IIS方面的解决方法或ASP中的其他选项,可能会产生相同的期望的最终结果.