sdelete.exe 无法与 cfexecute 一起使用
我正在尝试运行 sdelete.exe (http://technet.microsoft.com/ en-us/sysinternals/bb897443.aspx)使用 cfexecute,但我认为 cfexecute 甚至没有运行该命令。
它没有给我任何权限错误。我已将所有管理权限授予 ColdFusion 服务 ->登录选项卡。
以下是我在 .cfm 页面中成功运行但未删除文件的行:
<Cfexecute name="C:\Inetpub\wwwroot\sdelete.exe" arguments="-p 2 C:\Inetpub\wwwroot\Deepak\testP\removeme.txt" outputfile="C:\Inetpub\wwwroot\Deepak\testP\out.txt"></Cfexecute>
我能够在命令提示符下执行它:
>C:\Inetpub\wwwroot\sdelete.exe -p 2 C:\Inetpub\wwwroot\Deepak\testP\removeme.txt
并且删除.txt 消失了!
我检查了所有的窗口和 ColdFusion 日志,没有发现任何有用的东西。
I am trying to run sdelete.exe (http://technet.microsoft.com/en-us/sysinternals/bb897443.aspx) using cfexecute, but I think cfexecute is not even running that command.
It's not giving me any permission error. And I have given all admin privileges to ColdFusion service -> logon tab.
The following is the line that I have in my .cfm page that run successfully but doesn't delete the file:
<Cfexecute name="C:\Inetpub\wwwroot\sdelete.exe" arguments="-p 2 C:\Inetpub\wwwroot\Deepak\testP\removeme.txt" outputfile="C:\Inetpub\wwwroot\Deepak\testP\out.txt"></Cfexecute>
I am able to execute it in command prompt writing:
>C:\Inetpub\wwwroot\sdelete.exe -p 2 C:\Inetpub\wwwroot\Deepak\testP\removeme.txt
And remove.txt is gone!
I have checked all the windows and ColdFusion logs, and didn't found anything useful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
sdelete 首次启动时,会出现 GUI 提示,要求您接受许可协议。
ColdFusion 是一个服务器进程,通常在不同的用户帐户下运行。因此,您需要在该帐户上运行 sdelete 并接受协议。为此,您可以使用“运行方式”命令。
When sdelete starts up for the first time, it gives a GUI prompt for you to accept the license agreement.
ColdFusion is a server process, which would usually run under a different user account. So you need to run sdelete on that account and accept the agreement. To do so, you can use the Run As command.
向
cfexecute
添加超时值,即
timeout="100"
Add a timeout value to
cfexecute
ie
timeout="100"