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
Crazy…
I was able to reproduce it on the host itself:
- Run c:\windows\syswow64\cmd.exe
- Make sure you are running the x86 cmd:
echo %PROCESSOR_ARCHITECTURE%
x86
- Run a x86 cmd as SYSTEM user:
c:\pstools\PsExec.exe -i -s -d C:\windows\SysWOW64\cmd.exe
- Make sure you are running the x86 cmd:
echo %PROCESSOR_ARCHITECTURE%
x86
- Execute the command in question:
- 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
-
I’ve not enabled 32-Applications on the IIS App Pool. → no solution.
-
I launched the x64 powershell via cfexecute → no solution.
-
I followed this document → no solution.
-
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.
-
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:
- I executed c:\windows\system32\cmd.exe
- I executed c:\pstools\PsExec.exe -i -s -d c:\windows\syswow64\cmd.exe
- I opened the “Defaults” of cmd-windows.
- At the register “Layout” i’ve set the value of Width on “Screen Buffer Size” and “Window Size” from 80 to 150.
I tested again… and boooom… the output was there as expected; i got the missing colum “Record Data”.
Peace i’m out