• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

<CFEXECUTE> problem

Explorer ,
Oct 26, 2006 Oct 26, 2006

Copy link to clipboard

Copied

I have an application installed on the server. I need to start (popup) the app from a CF page.
I've done:
CFEXECUTE NAME="C:\Program Files\ABS\ABSCAC\WinSCM32.exe"></CFEXECUTE>
and the blank white page pops up. No app. I've tried the same line on Run and it starts the app.


I've also tried:
CFEXECUTE NAME="C:\WINDOWS\system32\ipconfig.exe" OUTPUTFILE="#OutFile#"></CFEXECUTE>
<CFFILE
ACTION="READ"
FILE="#OutFile#"
VARIABLE="FileContent">

<CFFILE
ACTION="DELETE"
FILE="#OutFile#">

<CFOUTPUT>
#HTMLCodeFormat(FileContent)#
</CFOUTPUT>
I get Error 500 page.
if I use cftry and catch the message is: OutFile does not exists.
What is the problem?
Any idea?
Thanks,
b.
TOPICS
Advanced techniques

Views

285

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Oct 26, 2006 Oct 26, 2006

Copy link to clipboard

Copied

LATEST
A few things:
  • First, try this code. It should work for you now:
    <cfexecute
    name = "C:\Windows\system32\cmd.exe"
    arguments = "/C dir C:\Windows\system32\ /s /ad /b"
    variable = "sDirList"
    timeout = 30 <!--- Zero timeouts will NOT work if output is to be returned (use 0 for "popup" threads only). --->
    />
    <CFOUTPUT><pre>#sDirList#</pre></CFOUTPUT>

  • Second, cfexecute is meant for programs that do something and then quit on their own. Using with WinSCM32.exe as a "popup" can eventually crash your server if you are not careful.
  • Third, you appear to be using Windows XP. In XP, Win32 mode programs and key executables like ipconfig are "protected" in an attempt to close some of the 237 security holes discovered in Micros**t software this week.
    This means that cfexecute IS running them (usually) but that you can't see the results or terminate the threads!
    USUALLY, you can clear this issue by checking "Allow service to interact with desktop" in the "Logon" tab, of the properties inspector, for the Coldfusion Service -- in the Windows Service Control panel.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation