I'm looking for some assistance with the following:
If have a .vbs script that creates/manipulates some objects.
Simple example:
test.vbs
DIM oDistiller
on error resume next
WScript.Echo "Creating distiller object..."
Set oDistiller = CreateObject("PDFDistiller.PDFDistiller.1"
WScript.Echo "Done creating distiller object..."
If oDistiller Is Nothing Then
WScript.Echo "Error: Cannot create PDF document. Adobe Acrobat Distiller is not available! Quiting..."
WScript.Quit 1
End If
When run from a command prompt i.e.:
cscript test.vbs
it works just fine and the object is created.
However, if I run this from a WScript.Shell command on an ASP page, the object is not created:
Example:
<%
set wshShell = Server.CreateObject("WScript.Shell"
wshShell.Run "C:\test.bat", 0, True
set wshShell=Nothing
%>
Test.Bat
@ECHO OFF
echo ============================ Start ======================================= >> c:\test.log
date /t >> c:\test.log
time /t >> c:\test.log
cscript c:\test.vbs >> c:\test.log
echo ============================= End ======================================= >> c:\test.log
Here is the output of the test.log file:
============================ Start =======================================
Wed 01/21/2004
1:29p
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
Creating distiller object...
Done creating distiller object...
Error: Cannot create PDF document. Adobe Acrobat Distiller is not available! Quiting...
============================= End =======================================
Anybody have any ideas of why this is failing? All help would be appreciated.
Thanks.
If have a .vbs script that creates/manipulates some objects.
Simple example:
test.vbs
DIM oDistiller
on error resume next
WScript.Echo "Creating distiller object..."
Set oDistiller = CreateObject("PDFDistiller.PDFDistiller.1"
WScript.Echo "Done creating distiller object..."
If oDistiller Is Nothing Then
WScript.Echo "Error: Cannot create PDF document. Adobe Acrobat Distiller is not available! Quiting..."
WScript.Quit 1
End If
When run from a command prompt i.e.:
cscript test.vbs
it works just fine and the object is created.
However, if I run this from a WScript.Shell command on an ASP page, the object is not created:
Example:
<%
set wshShell = Server.CreateObject("WScript.Shell"
wshShell.Run "C:\test.bat", 0, True
set wshShell=Nothing
%>
Test.Bat
@ECHO OFF
echo ============================ Start ======================================= >> c:\test.log
date /t >> c:\test.log
time /t >> c:\test.log
cscript c:\test.vbs >> c:\test.log
echo ============================= End ======================================= >> c:\test.log
Here is the output of the test.log file:
============================ Start =======================================
Wed 01/21/2004
1:29p
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
Creating distiller object...
Done creating distiller object...
Error: Cannot create PDF document. Adobe Acrobat Distiller is not available! Quiting...
============================= End =======================================
Anybody have any ideas of why this is failing? All help would be appreciated.
Thanks.