Solved

want to call exe file from asp

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

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Suggested Solutions

Do you have users whose passwords are expiring and they are constantly calling you?  Well I sure did and needed a way to put an end to this.  We have a lot of remote users which would not be notified that their passwords were expiring since they wer…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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 transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

895 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

16 Experts available now in Live!

Get 1:1 Help Now