• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 254
  • Last Modified:

Calling an exe program via ASP

Hello, the funtion I want to build is to convert a pdf file into html via ASP. Since I have found a open source program (pdftohtml), I want to make use of it.

http://pdftohtml.sourceforge.net

My problem is how I can call that exe program via the ASP. I have searched some information, one method i found is to use wscript.shell. And I tried with the following code:

===========================================
<html>
<body>
<Script language=vbscript runat="server">
    Dim oShell
Set oShell = CreateObject ("WSCript.shell")
oShell.run  "cmd /K CD C:\temp & pdftohtml.exe a.pdf & exit"
Set oShell = Nothing
     
</script>
</body>
</html>
===========================================

it, however, gives a error message of
"The instruction at "0x00446b40" referenced memory at "0x00000010". The memory can not be "read"."

I am testing in win2000.

The second problem is when I run it in another computer of winXp, I got a message of permission error message.

Microsoft VBScript(0x800A0046)

Does anybody know what these problems are? ^^? I am very appericated for your help.

Best Regards,
Vic
0
vicshek
Asked:
vicshek
1 Solution
 
sybeCommented:
permission error is because the IUSR_machinename must have rights on the wscript.dll.

0
 
vicshekAuthor Commented:
Thx sybe.^^

For testing purpose, I have set the IUSR_machine to admin ^^"

I just found the problem is caused by the permission of writing file/folder into the c:\temp. Then I grant full control to IUSR and IWAM, and it works.

Hope my experience can help ppl with similar problems. And thx again for your help, sybe. ^^

Vic
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now