Cfexecute not giving whole output (?)

Hi all

I have this powershell command:


I cfexecute it by using:

<cfexecute 
	name = "#Powershell#"
	arguments="Get-DnsServerResourceRecord -ZoneName ""netcult.ch"""
	timeout="15"
	outputfile="c:\file.txt">
</cfexecute>

or also tried by using:

<cfexecute 
	name = "#Powershell#"
	arguments="Get-DnsServerResourceRecord -ZoneName ""netcult.ch"""
	timeout="15"
	variable="output">
</cfexecute>

The results:

c:\file.txt looks like this:

Or the output of the variabe looks like this:

I’m missing the sixth column called “RecordData”!

What the heck is goin’ on? Any ideas what i’m doing wrong here?

Lucee Version: 5.3.3.62
OS: Win2k16
Webserver: IIS

Best regards
Tom

Hi all

If i redirect the output on the command line to a file, then it works.

But if i do the same via cfexecute…

<cfexecute 
	name = "#Powershell#"
	arguments="Get-DnsServerResourceRecord -ZoneName ""#Session.Verzeichnis#"" > ""#TempDir#\~#Session.Verzeichnis#.dns.tmp"""
	timeout="15"
	variable="dev_nul">
</cfexecute>

… then the problem is back :frowning:

Crazy…

I was able to reproduce it on the host itself:

  1. Run c:\windows\syswow64\cmd.exe
  2. Make sure you are running the x86 cmd:

    echo %PROCESSOR_ARCHITECTURE%
    x86

  3. Run a x86 cmd as SYSTEM user:

    c:\pstools\PsExec.exe -i -s -d C:\windows\SysWOW64\cmd.exe

  4. Make sure you are running the x86 cmd:

    echo %PROCESSOR_ARCHITECTURE%
    x86

  5. Execute the command in question:
    ch%20-%20Win2k16%5D
  6. Check the output:

It seem to be some x86 / x64 issue.

I can not find a x64 version of Lucee for Windows here.

Does somebody know if there is a x64 available somewhere?

Cheers
Tom

one workaround i’ve often used is to try wrapping the command you wanna cfexecute in a batch file

Hi all

  1. I’ve not enabled 32-Applications on the IIS App Pool. → no solution.
    ch%20-%20Win2k16%5D

  2. I launched the x64 powershell via cfexecute → no solution.

  3. I followed this document → no solution.

  4. I’ve downloaded adopt openjdk x64 here (jdk-11.0.5+10 AdoptOpenJDK - Windows x64) and replaced C:\lucee\jre with the content of the download → no solution.

  5. I executed

<cfexecute 
	name = "#cmd#"
	arguments="/Cecho %PROCESSOR_ARCHITECTURE%"
	timeout="60"
	variable="output">
</cfexecute>

Output: AMD64

Hmmm… so the stuff is executed in x64 env. Crazy. Next step:

  1. I executed c:\windows\system32\cmd.exe
  2. I executed c:\pstools\PsExec.exe -i -s -d c:\windows\syswow64\cmd.exe
  3. I opened the “Defaults” of cmd-windows.
    ch%20-%20Win2k16%5D
  4. At the register “Layout” i’ve set the value of Width on “Screen Buffer Size” and “Window Size” from 80 to 150.
    ch%20-%20Win2k16%5D

I tested again… and boooom… the output was there as expected; i got the missing colum “Record Data”.

ch

Peace i’m out