Skip to main content
May 14, 2007
Question

cfexecute - bat file issues

  • May 14, 2007
  • 2 replies
  • 540 views
Okay,

Since I am now frustrated with what should be simplicity, here is my current diemma.

I have a simply batch file to convert flv's froan FMS 2 server. I want to pass a name and have an SDK convert it to mp3. Everything works fine until I attempt the cfexecute on the batch file. I hard coded the file to test it, and then I will pass variables later.

//Batch file:

CD \
CD Program Files\Macromedia\Flash Media Server 2\sdk

conv.exe ..\applications\elearning\streams\audio\myfile.flv -out H:system\podcasts\mp3\myfile.mp3 -vf mp3 -abr 96000 -asr 44100

//end bacth file

This simply goes to the c: drive, then changes to the appropriate directory. once here execute conversion. (Setup this way for UNC mapping security, batch file exists away from exe) This works flawlessly on the server.

// CFM test page
<cftry>
<cfexecute name="\\192.168.1.1\sdk\tester.bat"
arguments="myfile"
variable="data"
timeout="2">
</cfexecute>
<cfcatch type="any">
<cfoutput>#cfcatch.Detail#</cfoutput><br>
</cfcatch>
</cftry><br><br>
<cfoutput>#data#</cfoutput>

//End cfm page

Now the only thing I see here that is problematic is that it is a mapped to the FMS server. I have run CMD commands fine for other stuff VIA UNC before, but never a bat file. Could this be the issue?

This is what data returns:

// start data variable:


C:\CFusionMX7\runtime\bin>CD \

C:\>CD Program Files\Macromedia\Flash Media Server 2\sdk

C:\>flvtovideo ..\applications\elearning\streams\audio\myfile.flv -out H:faculty\podcasts\mp3\myfile.mp3 -vf mp3 -abr 96000 -asr 44100

//end data variable

It appears it cannot get to the correct directory to run the conv.exe. Using Server 2003 CF7, connecting VIA UNC to Server 2003, FMS 2. Using A/D both systems running as domain admin, as with CF7 services.

Why does it not accept the second CD?
Could it be the bat file?
Why does it start in the CFusionMX7\runtime\bin directory?

Any suggestion appreaciated, I am no way shape or form a bat guru.

Thanks
    This topic has been closed for replies.

    2 replies

    May 14, 2007
    Both Systems are on a domain. The CF7 server starts up with the domain administrator account under administrative tools/services. This had to be done for LDAD integration.

    The FMS server is also on the domain, and I have the mapped drive security and priveleges set to domain\administrator, for all security & priveleges.


    I am pretty sure that the server is able to run the bat and cmd; since I can read & write text files in the same directory.

    I tested this also by mapping and executing form a work station, with a denied access prompt, form the CF 7 server I do not get a prompt.
    Inspiring
    May 14, 2007
    The first thing to confirm. Do you know that the CF server has the
    required permissions to access the UNC path and run a bat|exe there?

    With a default install the CF service is configured as a "local system"
    user and has no rights or permissions to access resources over a
    network. If you have not configured it to do so, I would expect
    behavior as you described. You can access the resource and run it with
    your permissions but when CFEXECTUTE runs, it uses the CF service user
    which does not have the required permissions.