Current location: Hot Scripts Forums » Programming Languages » ASP » Problems launching program on webserver


Problems launching program on webserver

Reply
  #1 (permalink)  
Old 03-12-04, 01:46 PM
domiflichi domiflichi is offline
New Member
 
Join Date: Mar 2004
Location: CA
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Problems launching program on webserver

Hi all,
I've created an ActiveX dll that I call from an .asp page, which is supposed to launch a program on the server such as Internet Explorer. The problem is, that when the .asp is called, only a process for that program (iexplore.exe) gets launched. There is no visible form/window for it! I've tried so many different things, and I can not get it to work. Here's the little code:

Code:
Option Explicit
'Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_NORMAL As Long = 1

Public Sub LaunchIENow()
    'Dim pid&
    'pid = Shell("C:\Program Files\Internet Explorer\iexplore.exe http://www.amazon.com", vbNormalFocus)
    'pid = Shell("C:\launchIE.bat", vbNormalFocus)
    'Shell "rundll32.exe url.dll,FileProtocolHandler http://www.google.com"
    'ShellExecute Me.hwnd, vbNullString, "http://www.google.com", vbNullString, "C:\", SW_SHOWNORMAL
    'pid& = ShellExecute(0, vbNullString, "http://www.google.com", "C:\", SW_SHOWNORMAL)
    'Shell "explorer.exe http://www.google.com", vbNormalFocus
    ShellExecute vbNull, "open", "C:\winnt\notepad.exe", vbNullString, vbNullString, SW_NORMAL
End Sub
As you can tell, I've tried many different things to get this work including trying to launch just the simple notepad program, but I get the same result every time.
And here's the .asp page that calls this little uncooperating monster .dll:

Code:
<%Option Explicit
Dim oLaunchIE 'Create an object for the component
	
Set oLaunchIE = CreateObject("Cygnus.LaunchIE")

oLaunchIE.LaunchIENow

Set oLaunchIE = Nothing

%>
Thanks in advance!
Reply With Quote
  #2 (permalink)  
Old 03-19-04, 10:57 PM
chemical chemical is offline
New Member
 
Join Date: Mar 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
As far as I know, you cannot launch an application with a user interface from a server process. Curious, why would you want to do this?
Reply With Quote
  #3 (permalink)  
Old 03-22-04, 10:12 AM
domiflichi domiflichi is offline
New Member
 
Join Date: Mar 2004
Location: CA
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Well, actually through some other forums I've been posting in, I found out that there's actually a DLL already created for this specific purpose - ASPExec (but I'm having the same problem - it launches a process, but no interface/form). You can get it at serverobjects.com, but it's unsupported. The reason why I need this functionality is because we have a browser on the server that refreshes every 20 seconds and it processes and sends email out if there is any via some special programs, and it times out sometimes, and we would like the ability to launch a new browser to that URL to get it going again remotely w/out having to use pcAnywhere.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
looking for a good php affiliate program & autoresponder webmoon Script Requests 2 03-30-04 12:23 AM
New programmer here... is this program correct? kml21panther C/C++ 3 01-30-04 11:51 PM
2 spacing/alignment problems Arowana HTML/XHTML/XML 0 01-07-04 11:58 AM
Need Help writing a C program trac1_1999 Script Requests 1 09-07-03 06:13 PM
Scripting problems plz help darkcarnival PHP 2 09-02-03 03:51 PM


All times are GMT -5. The time now is 04:16 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.