Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Location
    California
    Posts
    40

    Unanswered: Problem w/page launching prog. on server

    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!

  2. #2
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    <<
    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...
    >>

    That doesn't make a whole lot of sense to me as ActiveX and the Internet Explorer browser are generally clientside and of course the server is server-side.

    But for reference about how to run something on the server:

    WshShell
    Scott Mitchell - 5/14/2001 4:07:58 PM
    http://www.aspmessageboard.com/forum...13545&F=27&P=1

    4GuysFromRolla.com : ASP FAQS : The Nature of Things
    Question: How can I call an executable program from my ASP page? by Bill Wilkinson - 10/17/2000
    http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=67

    Executing Applications on a Server Through an ASP Page
    Example: Getting Latest Versions From VSS [Micorsoft Visual Source Safe] by Neema Moraveji - 7/21/1999
    http://www.4guysfromrolla.com/webtech/072199-2.shtml
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

  3. #3
    Join Date
    Dec 2003
    Location
    California
    Posts
    40
    Thanks for the links, I tried the examples shown at those places, and am still having the same problem - the program launches on the server just like I want, but with no visible form - only a process launches. I even tried downloading and installing the program, ASPExec and tested it, and the same thing happens...I'm starting to wonder is something is weird with our server - I'm going to try and test on some other servers...but if anyone has any ideas though, it would be greatly appreciated.
    thanks.
    jamie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •