coldfusionuser-accountscoldfusion-8cfexecute

sdelete.exe is not working with cfexecute


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.


Solution

  • 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.