run dos batch file from cfm page

Posted on 2009-05-26
Medium Priority
Last Modified: 2013-12-24
I have the following that I run from the E drive and I'm doing directly on the server.  I'm logged in as admin too.  It's not working.  It just deletes the file (last line in the batch file).
cfm page:
.bat file:
GPG -r pub --output E:\[path]\filename.gpg --encrypt E:\[path]\[dir]
ren E:\vpTwo\[path]\[file].gpg [filename]1%date:~4,2%%date:~7,2%%date:~10,0%.gpg
replace E:\[path]\blank\[dir] E:\[path] /s
del E:\[path]\[filename]

Open in new window

Question by:COwebmaster
  • 2
  • 2
LVL 36

Accepted Solution

SidFishes earned 2000 total points
ID: 24478171
remember that what -you- are logged in as is not relevant, it's the context of the cfservice (localsystem by default)

local system must have permissions for a local operation and if you are using network resources you need to set up cfservice to run as a specific user and assign that "user" permissions


Author Comment

ID: 24478565
is that through services?  where would I find cfservice?
LVL 36

Assisted Solution

SidFishes earned 2000 total points
ID: 24478963
yes, services.msc

from my blog

To set up the Coldfusion Server service do the following:

   1. Create a standard user in Active Directory (call it CFService)
   2. Select a very strong password and Set Password To Never Expire
   3. Right Click on the directory you want CF to have access to
   4. Select Properties > Security Tab
   5. Click Add
   6. Enter CFService in the box and click OK
   7. Click CFService in the Group Or User Name Window
   8. Check the appropriate permissions (usually Read & Execute, List Folder Contents and Read))
   9. Click Apply and OK
  10. Open services.msc as admininstrator (either logged on or use RunAS)
  11. Right Click Coldfusion 8 ApplicationServer > Properties  and select LogOn Tab
  12. Check This Account and enter the user name as yourDomain\CFService
  13. Enter CFService password twice
  14. Click OK
  15. Restart Coldfusion 8 Application Server service

Author Closing Comment

ID: 31585539

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
The following information will get you familiar with your new DV server, including the (mt) Account Center, the Plesk Control Panel, our world-renowned support department and the rest of the (mt) tools that come with your new service.
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.
Hi, this video explains a free download that you can incorporate into your Access databases, or use stand-alone for contact management. Contacts -- Names, Addresses, Phone Numbers, eMail Addresses, Websites, Lists, Projects, Notes, Attachments…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question