Solved

want to call exe file from asp

Posted on 2007-11-23
3
210 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 500 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

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Authentication type 1 27
lync 2013 7 36
AD reporting and update tool 9 53
IT Contract Fee 17 81
In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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 …

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now