Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Really weird behavior with CFEXECUTE

Status
Not open for further replies.

kathryn

Programmer
Apr 13, 2000
776
0
0
US
OK, here is the situation

We have a development server, GENESIS, which is an NT box with CF 5.0 Server installed. On this box, CFEXECUTE runs fine. The CFEXECUTE calls wscript.exe which runs a VBScript to convert uploaded Word and Excel documents to HTML.

We also a test server, ODYSSEY, which is an NT box with CF 5.0 Server installed. On this box, CFEXECUTE will not execute.

Here is the entire code of the template:

<cfoutput>
<cfexecute
name=&quot;C:\WinNT\System32\wscript.exe&quot; arguments=&quot;e:\inetpub\ acf13.doc e:\inetpub\</cfexecute>
</cfoutput>

(Note, the CFOUTPUTs are there because the arguments are normally dynamically generated. We hardcoded them for debugging purposes.)

OK, here is where it gets weird. I can run the above code from the command prompt on ODYSSEY:

c:>wscript.exe e:\inetpub\ acf13.doc e:\inetpub\ and it runs fine.

But, if I run it by calling the CF template, the VBScript is never executed. I have messageboxes that pop up in three places in the script if it runs, which is how I monitor whether the VBScript runs.

Both GENESIS's and ODYSSEY's CF App Server are currently set to run as an account, CFService. When I set ODYSSEY to run as the system account and check the box to allow interaction with the desktop, the page still does not execute. BUT, when it is running as the system account, if I remove those two CFOUTPUT tags, then the page executes the VBScript??!!??$^%$#

Our gut feeling is that this is a permissions problem, but we cannot figure out where, what, how, when, or who.

When I posted this problem yesterday, I got some great suggestions for editing the page to make it work, but my boss and I are way too fixated on this problem for that. We want this to work on ODYSSEY just like it does on GENESIS.

I have read the thread in the Support Forum on the Macromedia/Allaire site about this bug, and we have tried everything mentioned there. As a matter of fact, that is how I found out that the page would execute without the CFOUTPUTs when the Service was running under the system account.

Any ideas, resources, or references would be greatly appreciated.
Kathryn
 
I have 2 questions to start off.

1. First, is &quot;Enable CFEXECUTE tag&quot; checked in Cold Fusion Admin > Basic Security?

2. What is the purpose of the <CFOUTPUT> tags?

3. Does this work?

[COLOR=000080]<PRE>[/color]
<CFEXECUTE NAME=&quot;C:\WINNT\system32\CMD.EXE&quot;
ARGUMENTS=&quot;/c ping
Code:
www.yahoo.com
&quot;

TIMEOUT=&quot;10&quot;/>

[COLOR=000080]</PRE>[/color] - tleish
 
tleish,

Thanks for the quick reply. The answers to your questions are:

1. Yes, CFEXECUTE is enabled.
2. The cfoutput is there because originally the arguments for the wscript.exe were dynamically generated. We have hardcoded them for debugging purposes.
3. Yes, the ping of yahoo worked.

Hope that helps you to help me.
Kathryn


 
You have the argument:

<cfexecute
name=&quot;C:\WinNT\System32\wscript.exe&quot; ...

</cfexecute>

Yet, you stated that this command works:
c:>wscript.exe

Are you sure the exe file is in the right place? - tleish
 
tleish,

Yes, the exec is in the correct place. Even though it is in the system32 directory, it can be called directly from the c: prompt.

One important thing I didn't mention is that I can get another, dummy, VBscript to run using the exact same syntax. The dummy script just copies a file. The difference is that the dummy script does not take any arguments.

Does that help at all? Kathryn


 
So, the problem isn't executing the file, the problem is that one will take arguments while the other will not.... Correct? - tleish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top