Skip to main content
Known Participant
November 25, 2009
Question

Vbscript Coldfusion 64bit Not Working

  • November 25, 2009
  • 1 reply
  • 2104 views

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!

This topic has been closed for replies.

1 reply

Inspiring
November 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).

dbldutchAuthor
Known Participant
November 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.

dbldutchAuthor
Known Participant
November 25, 2009

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