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

Cfexecute and GnuPG

New Here ,
Jul 14, 2006 Jul 14, 2006

Copy link to clipboard

Copied

Hi,
I am trying to execute this line:
<cfexecute name="c:\gnupg\gpg.exe" arguments="--fingerprint" timeout="50" outputfile="c:\gnupg\test2.

file">
</cfexecute>
to no avail. The file is generated wtih no content. Even though I could run it successfully at the

command line.
Also, if I use the variable attribute and do a cfdump, it outputs an [empty string].


Any idea to what else I should I tried?


Thanks for your help,
Hon
TOPICS
Advanced techniques

Views

288

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
Participant ,
Jul 14, 2006 Jul 14, 2006

Copy link to clipboard

Copied

Top reasons why something runs (on Windows) from DOS prompt, but does not run using CFEXECUTE.

1. Account
By default, services run under LOCAL\SYSTEM account. If the task requires some privileges not granted to this account, it will fail. You can change service's account using Startup Options for particular service. This is a very insecure option, however, many people do this, when no other options available. There are also third-party replacements for CFEXECUTE that can do this more securely.

2. User profile
A task may need to run in the context (profile) of a specific user in order to be successful. It means that user (see 1) must be logged in interactively: in the same way as you do when you press CTRL-ALT-DEL. The solution can be to run the service under the same account that is used to login in Windows. This might be unacceptable, since on server environment there might not be any interactive user at all. Many security elements in Windows are connected with user profiles: SSL certificates, encryption keys, etc. If the program you run uses some registry settings, and those settings are stored in a user profile, not in machine profile, such program will not run successfully, unless that profile is loaded and accessible to the service account. Good example is ODBC datasources setup: only machine datasources, in general, available to services. So, another solution is to make sure that all necessary stuff goes to the machine profile. So, you might try to re-install (or even manually correct the installation) the software accordingly.

3. Desktop
If your task uses windows messages to communicate with other running tasks, all of them must be using the same desktop and window station. This applies to all messages, including DDE. This is unlikely your case. All tasks that were launched (explicitly or implicitly) by interactive user use default (visible) interactive desktop. All services run on other non-visible and non-interactive desktops. Therefore, they cannot communicate. You can try to check the box "Allow Service To Communicate With Desktop" in service' Startup Options to see, if it makes any difference. This option makes a service to run on the interactive desktop. Highly not recommended.

There could be other reasons, I guess. But you check those first.

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
New Here ,
Jul 14, 2006 Jul 14, 2006

Copy link to clipboard

Copied

LATEST
If the code can run a simple netstat.exe and produced a file with content successfully, I am wondering if CF server couldn't see the gpg.exe?

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