Solved

want to call exe file from asp

Posted on 2007-11-23
3
214 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html?cid=Gene_Skyport) provided 218 attendees with a step-by-step guide for…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

752 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