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

Vbscript Coldfusion 64bit Not Working

New Here ,
Nov 25, 2009 Nov 25, 2009

Hi, I'm in some major need of help with a deadline coming up very quickly.

Disclaimer: Not a hardware/server guy so I don't know much here.

I have a dedicated server with 64bit Windows Server 8 and 64bit CF 9.  I have some Vbscript that runs PERFECTLY from the command line but it gets hung up when I run it using CFEXECUTE.  I'd love to use COM objects but apparently that isn't a feature that works with 64bit CF.  I have CFEXECUTE working in other areas but they use .exe not .vbs.

Vbscript

Dim wordFile, pdfFile
WScript.Echo "Step 1"
Set oPrinter = CreateObject("easyPDF.Printer.6")
WScript.Echo "Step 2"
Set oPrintJob = oPrinter.PrintJob
WScript.Echo "Step 3"
wordFile = "C:\file1.doc"
pdfFile = "C:\pdffile1.pdf"
WScript.Echo "Step 4"
oPrintJob.PrintOut wordFile, pdfFile
WScript.Echo "Step 5"
Set oPrintJob = Nothing
Set oPrinter = Nothing
WScript.Echo "Step 6"

CF Code

<cfexecute name='cscript.exe' arguments='c:\simplepdf.vbs' outputfile='#ExpandPath("pdf_test.txt")#' timeout="50000" />

Output from cfexecute

Step 1
Step 2
Step 3
Step 4

Thanks

Thanks for any help. Like I said the script runs perfectly when executed through the command line and it obviously starts with the cfexecute.

Thanks!

TOPICS
Advanced techniques
1.9K
Translate
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
Advocate ,
Nov 25, 2009 Nov 25, 2009

When CF runs your program, it will do so using the account that CF is using itself. By default that is the Local System account. So in order to test your executable, you need to log in to the server using the Local System account, or you need to run ColdFusion under a regular account on the system (usually an account with Local Administrator privileges).

Translate
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 ,
Nov 25, 2009 Nov 25, 2009

Thanks for replying!

I went in and created an Administrator called "WebUser". I right clicked on my computer and went to manage and verifed they were listed under "administrator" in local users and groups.

I added them as the Log On for the CF service and restarted the service.

Got the same results.

Translate
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 ,
Nov 25, 2009 Nov 25, 2009

Just to verify, I logged into the WebUser account and was able to successfully run the vbscript from the command line.

Translate
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
Advocate ,
Nov 25, 2009 Nov 25, 2009

dbldutch wrote on 11/25/2009 4:53 PM:

Just to verify, I logged into the WebUser account and was able to successfully run the vbscript from the command line.

How about doing something completely different. Since you are on CF9

ColdFusion has Office to PDF conversion built in. All you need to do is

install OpenOffice and then use cfdocument with your .doc as the source

file.

http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WS692D73AF-6338-495d-9E47-C2ECD8BF9307.html

Translate
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 ,
Nov 25, 2009 Nov 25, 2009

easyPDF has other features that I will need to utilize so that's not an option. Thanks.

Translate
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 ,
Nov 25, 2009 Nov 25, 2009

Do you know anything I could look at changing to see why ColdFusion won't run my programs with cfexecute.  They work perfectly through the command line on the server but won't work with cfexecute. I know they start cause I'm writing to a file and I know its getting the attributes cause I write them out but then it stops when I try to have it open a file. Just stops working.

Thanks!

Translate
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
Advocate ,
Nov 25, 2009 Nov 25, 2009

If all else fails, run CF in console mode

Shut down your ColdFusion service. Then go to the command line and your \JRun4\bin folder and run the command "jrun -start cfusion". This is assuming you are running a multiserver installation and the default instance. If you have a standard install, check for a cfstart,bat file i the bin folder. This should start CF with its standard out dumped in the console.

Then, when CF is running, go to your site and run the request again. Is there anything shown in the console now? Are there any popups?

Translate
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 ,
Nov 25, 2009 Nov 25, 2009

Wow..... That is crazy. I ran my script AFTER shutting down the CF sevice through services and double-clicking on cfstart.bat and it WORKED.  Just to verify I closed out of the cmd box and restarted the service and it did NOT work.

How in the world can I get this to start working properly?

You have been an amazing help so far!! THANKS!!!!!

Translate
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
Advocate ,
Nov 25, 2009 Nov 25, 2009

I have had that problem with a CF process that started something else where that something else did some runas weidness. Never solved it for that case.

For your problem, go into the services control panel and select the "Allow service to interact with desktop" checkbox. Then restart and try agaoin.

Translate
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 ,
Nov 25, 2009 Nov 25, 2009

That didn't get it working either.

I truely appreciate your help.

Translate
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
Advocate ,
Nov 25, 2009 Nov 25, 2009
LATEST

I took a quick peak at the easyPDF manual and if I had to guess I would say it has to do something with the security settings on the COM object: http://www.pdfonline.com/easypdf/epsdk_manual/index.htm?page=running_on_server%2Fprinter_sdk%2Fabout_loader.htm

But I am afraid I can't really help you any further then this. If you solve this, please let us know.

Translate
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