哪个用户在aspx文件所在的服务器上运行cmd

Which user runs cmd on server where aspx file is located

我们使用在 link 中有两个变量的 aspx 网页。示例:

aspxpage.aspx?argument1=arg1&argument2=arg2

aspx 调用 .cmd 并将两个参数传递给它。代码是:

dim wshell
dim arg1
dim arg2
dim runcmd

arg1 = Request.Querystring("arg1")
arg2 = Request.Querystring("arg2")

wshell = CreateObject("WScript.Shell") 
runcmd = """path\to\run.cmd """ + arg1 & " " & arg2 & ""
wshell.run (runcmd, 1, true )
wshell = nothing

我想知道如何检查哪个用户在服务器上调用了 .cmd,这就是 运行ning。需要知道这一点以检查该用户是否具有适当的权限运行 cmd 和 cmd 调用的所有函数。

根据评论,我进行了一些谷歌搜索。发现 defaultAppPool 用户需要文件夹权限才能在文件夹中写入。授予用户权限后,应用程序又可以运行了。

https://docs.microsoft.com/en-us/iis/manage/configuring-security/application-pool-identities