Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

want to call exe file from asp

Posted on 2007-11-23
3
Medium Priority
?
222 Views
Last Modified: 2011-10-03
hi everybody, I want to call exe file form asp which is a standard visual basic project file. I m writing the following code to access.

dim shell,shell1

Set shell = Server.CreateObject("WScript.Shell")

shell1=shell.Run ("c:\Inetpub\wwwroot\Project2.exe",6,True)
set wshell = nothing                  

and I m getting the error (0x80070002) . Can anyone solve this problem.

Many Thanks
0
Comment
Question by:Parvez_Siddiqui
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
-DJL- earned 1500 total points
ID: 20341411
Make sure the file path is correct and that the IUSR_Machinename account (or another account your using) has permissions to read and execute the file.

http://classicasp.aspfaq.com/general/how-do-i-execute-a-dos-command/batch-file/exe-from-asp.html

http://support.microsoft.com/default.aspx/kb/311481

0
 

Author Comment

by:Parvez_Siddiqui
ID: 20348058
Hi DJL,
          Sorry i was trying the .exe file...actually it is project2.vbp. I rectified it and tried to run that code which is
Set shell = Server.CreateObject("WScript.Shell")

shell1=shell.Run ("c:\Inetpub\wwwroot\Project2.vbp",6,True)
set wshell = nothing                  
its just hanging up...not showing anything.

Let me tell you one thing, I read one of the suggestions given in the calling .vbs from asp.
It says that you should  not have an interface in that ,  I have one form and it has cmd button when u click its gives the ans and actually my coding is placed in the cmd1_click () procedure.

when I call this project2.vbp file...its just hang up. I tried all the possible soltuions given in one question...but still doesnt work. I tried the above same code and its hanged up

Then i replaced that code with
Server.Execute("c:\Inetpub\wwwroot\Project.vbp")
it gives me error

Server object, ASP 0231 (0x80004005)
Invalid URL form or fully-qualified absolute URL was used. Use relative URLs.
/mypage.asp, line 17

And again i tried the solution : sayng like go to website properties-> home directory-> application protection and change from medium to low. But in my case it was already on low .then too the error is coming.

can u plz suggest something

0
 

Author Comment

by:Parvez_Siddiqui
ID: 20348208
Hi DJL, I solved the interface problem.. Now it just an executable file . with no forms. but still the problems persists.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

972 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