cfexecute

CFEXECUTE seems to not execute PowerShell in ColdFusion 11

雨燕双飞 提交于 2019-12-24 02:52:22
问题 Here is a sample: <cfset cmd="get-date -format g" /> <cfset args="-inputformat none -Command " & cmd /> <cfoutput> <cfexecute name="powershell.exe" variable="result" errorvariable="err" arguments="#args#" timeout="99" /> <p>Result: <cfif result neq "">#result#<cfelse>None</cfif></p> <p>Error: <cfif err neq "">#err#<cfelse>None</cfif></p> </cfoutput> On Windows 2008 R2 with ColdFusion 10, this will accurately put the PowerShell command's output into the result variable. After upgrading to

CFExecute not executing appcmd.exe

核能气质少年 提交于 2019-12-24 00:57:51
问题 I created the following code on a Cofdfusion server: file name: testWebsite.cfm <cfoutput> <cfset exec_command = "add site /name:""demosite"" /bindings:http://demosite.testserver.com:80 /physicalpath:""D:\Websites\demosite"" "> <cfexecute name="C:\Windows\System32\inetsrv\appcmd.exe" arguments="#exec_command#" timeout="60" /> Done! </cfoutput> But when I execute this file e.g. http://www.demoserver.com/testcases/testWebsite.cfm It just displays "Done!" without any errors, it doesn't execute

sdelete.exe is not working with cfexecute

此生再无相见时 提交于 2019-12-11 06:18:54
问题 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

coldfusion variables into powershell

血红的双手。 提交于 2019-12-11 03:27:49
问题 I have a simple powershell script that creates a txt file thus:- set-executionpolicy unrestricted -force $MyVar = 'My Content' $MyVar | out-file -FilePath "C:\_Testing\test.txt" This is called from a ColdFusion script here:- <cfexecute name="C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" arguments="C:\ColdFusion9\wwwroot\testsite\wwwroot\_Testing\powershellTest.ps1"/> And that works - creates the txt file and puts the content in but what I want to do though is pass a variable

Run VBScript using CFExecute throws error but works fine via command line

﹥>﹥吖頭↗ 提交于 2019-12-11 03:19:41
问题 I am trying to run a VBScript but CFExecute throws an error <cfexecute name = "C:\Windows\System32\CScript.exe" arguments = "//NoLogo D:\Excel.vbs D:\test.xls" variable = "data" timeout = "100"> </cfexecute> <cfdump var="#data#"> Error: Error: 424 Source: Microsoft VBScript runtime error Description: Object required But when I run the VBScript with CMD it works fine C:\Windows\System32 > cscript //nologo D:\Excel.vbs D:\test.xls I have full admin access, so why am I getting this error? 回答1:

CFEXECUTE assigning it to run with administrator rights

安稳与你 提交于 2019-12-01 15:51:53
I am trying to change a password with active directory using cfexecute . The only code on my page is this (username and the new password are filled in): <cfexecute name="c:\windows\system32\cmd.exe" arguments="NET USER username password /domain" outputfile="C:\Users\administrator\Desktop\test.txt" timeout="90"> </cfexecute> When I tried running this code through dreamweaver on my pc the tab in my browser just kept spinning even after 5 min... I closed the tab went to the server logged in and the text.txt was there empty. But I am unable to delete it because it says coldfusion.exe is using it??

CFEXECUTE assigning it to run with administrator rights

不想你离开。 提交于 2019-12-01 14:47:58
问题 I am trying to change a password with active directory using cfexecute . The only code on my page is this (username and the new password are filled in): <cfexecute name="c:\windows\system32\cmd.exe" arguments="NET USER username password /domain" outputfile="C:\Users\administrator\Desktop\test.txt" timeout="90"> </cfexecute> When I tried running this code through dreamweaver on my pc the tab in my browser just kept spinning even after 5 min... I closed the tab went to the server logged in and

How do I keep CFEXECUTE from hanging after a PrintStackTrace

久未见 提交于 2019-11-27 09:48:20
I'm using ColdFusion MX7 to perform a CFEXECUTE on some Java 6 code. Unfortunately, since CF7 does not work under JDK 6 I must do it this way. My problem is that when an exception happens in the Java code if I call a printStackTrace on the exception the CFEXECUTE command hangs. ColdFusion eventually times out but the Java process continues to hang in the background. I'm guessing there is some blocking going on but I can't seem to figure out why. If I don't do a printStackTrace then everything works fine. The exceptions are WebService exceptions generated with JAXWS from the Oracle Information

How do I keep CFEXECUTE from hanging after a PrintStackTrace

浪子不回头ぞ 提交于 2019-11-26 14:52:58
问题 I'm using ColdFusion MX7 to perform a CFEXECUTE on some Java 6 code. Unfortunately, since CF7 does not work under JDK 6 I must do it this way. My problem is that when an exception happens in the Java code if I call a printStackTrace on the exception the CFEXECUTE command hangs. ColdFusion eventually times out but the Java process continues to hang in the background. I'm guessing there is some blocking going on but I can't seem to figure out why. If I don't do a printStackTrace then everything