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

Problem with CFEXECUTE (Urgent!)

Guest
Aug 25, 2006 Aug 25, 2006

Copy link to clipboard

Copied

Hi,

I've been using CFEXECUTE to call an exe file. This exe file is supposed to do 2 things.

1. Update an Excel Sheet using values from the database.
2. Shutdown all remote pc's

The shutdown of the remote pc's is actually done in a bat file using the command
shutdown -s -m \\remote_pc_name_1 -t 5
shutdown -s -m \\remote_pc_name_2 -t 5
shutdown -s -m \\remote_pc_name_3 -t 5
shutdown -s -m \\remote_pc_name_4 -t 5

This shutdown command works perfect, no doubt about it! I've tested it on standalone, i.e. I've run the bat file and the remote pc's shutdown.

Now this bat file (called shutdown.bat) is included in a small VB program (called update_shutdown.exe) using the following command

Shell(C:\shutdown.bat)

update_shutdown.exe also contains commands to update the required Excel sheet on the server.

The exe file update_shutdown.exe works perfect on its own. The Excel sheet is updated and the remote pc's are shutdown.

Now, when I use the tag CFEXECUTE to call the exe file, only the update works, the remote pc's DO NOT SHUTDOWN AS THEY ARE SUPPOSED TO!!!

The syntax is very simple <cfexecute name="C:\update_shutdown.exe">

Can somebody please explain to me what the problem might be?

In simple english, why is it that when I run the exe (by double-clicking on it obviously!) on standalone, both the Excel sheet is updated and the remote pc's are shutdown, but when I call the exe via CF, it's as if it's preventing the exe to run the bat file???

Your help will be greatly appreciated as this is a very important issue.

Thanks and regards,
Yogesh Mahadnac
TOPICS
Advanced techniques

Views

446

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
Guest
Aug 25, 2006 Aug 25, 2006

Copy link to clipboard

Copied

This work-around may work. Put C:\update_shutdown.exe into a one-line .bat file called foo.bat. Then, change your CFEXECUTE to <cfexecute name="C:\foo.bat">

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
LEGEND ,
Aug 25, 2006 Aug 25, 2006

Copy link to clipboard

Copied

LATEST
Permission differences between you and the CF service? This is always
the first thing I investigate when something works when I run it, but
does not work when run under ColdFusion. The easiest test is usually to
go to the ColdFusion service in the service panel and change the LogOnAs
to your user account from the default "LocalSystem".

My first guess is that the CF LocalSystem does not have permission to
remote shut down other computers. If changing the LogOnAs to your
account works, you probably do not want keep it this way in the long
run. What we do, is create an User Account just for the CF service
which we can then assign the appropriate permissions that CF needs to do
the tasks we build on it.

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