从 IIS6 运行 bash 脚本

发布于 2024-10-02 14:33:02 字数 564 浏览 0 评论 0原文

在 Windows 2003 上运行 IIS6。我正在尝试设置一个运行 bash 脚本的简单 ASP 页面:

dim wshShell
set wshShell = CreateObject("WScript.Shell")

dim command
command = "c:\inetpub\wwwroot\bin\bash.exe /cygdrive/c/inetpub/wwwroot/test.sh"

wshShell.Run(command)
set wshShell = nothing

我已将 IIS6 配置为使用帐户 IUSR_SERVERNAME 作为默认应用程序池的标识,并确认当我 如果我将命令

runas /usr:IUSR_SERVERNAME [command]

设置为 notepad.exe,则 IIS6 会启动它(当然没有窗口,但我可以在任务管理器中看到它,并且用户名设置为 IUSR_SERVERNAME)。

有什么我忽略的东西需要配置吗?我在 Windows 7 / IIS7 上运行了一个类似的脚本,运行起来并不困难。

Running IIS6 on Windows 2003. I'm trying to set up a simple ASP page which runs a bash script:

dim wshShell
set wshShell = CreateObject("WScript.Shell")

dim command
command = "c:\inetpub\wwwroot\bin\bash.exe /cygdrive/c/inetpub/wwwroot/test.sh"

wshShell.Run(command)
set wshShell = nothing

I've configured IIS6 to use the account IUSR_SERVERNAME as the identity for the default application pool, and confirmed that the script executes when I run it from the command line using

runas /usr:IUSR_SERVERNAME [command]

If I set the command to be notepad.exe, IIS6 launches it (with no window, of course, but I can see it in Task Manager, and the user name is set to IUSR_SERVERNAME).

Is there something I'm overlooking that I need to configure? I've got a similar script running on Windows 7 / IIS7, and it wasn't difficult to get running.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

大姐,你呐 2024-10-09 14:33:02

已解决:切换到轻量级 Mongoose Web 服务器(使用 Tcl CGI 脚本而不是 ASP)。就我们的目的而言——运行一个简单的演示——这工作得很好,而且启动和运行它的痛苦要小得多。

Resolved: switched to the lightweight Mongoose web server (using a Tcl CGI script instead of ASP). For our purposes -- running a simple demo -- this works fine, and it was much less painful to get it up and running.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文