Starting a desktop app from ASP.NET

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Starting a desktop app from ASP.NET

    I am trying to spawn a seperate process from my asp page
    so when a user clicks the link or button a desktop program
    is launched. This will be on an intranet and the program
    will exist on the users desktop. I can use the following
    code in webmatrix to run a process on my local machine:

    <%@ Page Language="VB" %>
    <script runat="server">

    ' Insert page code here
    '

    Sub Button1_Click(sender As Object, e As EventArgs)
    Dim startInfo As System.Diagnostics.ProcessStartInfo
    startInfo = New
    System.Diagnostics.ProcessStartInfo()
    Dim p As System.Diagnostics.Process = New
    System.Diagnostics.Process()
    startInfo.FileName = "c:\8133324.txt"
    startInfo.WindowStyle =
    System.Diagnostics.ProcessWindowStyle.Normal
    p.Start("c:\winnt\notepad.exe")
    End Sub

    </script>
    <html>
    <head>
    </head>
    <body>
    <form runat="server">
    <asp:Button id="Button1" onclick="Button1_Click"
    runat="server" Text="Button"></asp:Button>
    &nbsp;<!-- Insert content here -->
    </form>
    </body>
    </html>


    But in .NET Studio running on IIS the process doesn't
    spawn. I have tried the following code:

    Dim startInfo As New ProcessStartInfo("IExplore.exe")
    startInfo.WindowStyle = ProcessWindowStyle.Normal
    Process.Start(startInfo)

    in a button click event, but nothing happens. Any help
    would be greatly appreciated.
    (Please send VB code, I know C# but this shop uses VB.NET
    only)
    John


    John Wright Guest

  2. Similar Questions and Discussions

    1. desktop exe cam app
      Hi Guys and Girls, Im having a bit of a problem creating a stand alone cam exe projector that talks to my remote media server which in turn talks...
    2. Remote Desktop
      HI I need help again. Again I do not want to pay the 100 dollars for technical support so someone help me. I have a computer running windows XP and...
    3. Desktop icons
      Linda, Have you tried resetting the file associations? John "Linda Rathgeber" <lightly@sc.rr.com> wrote in message...
    4. Desktop
      How can I reduce all open windows so that only the desktop is visible? Is there a shortcut key? In Windows one simply clicks on the icon 'show...
    5. Desktop shortcut
      * Pim Versteeg : Perhaps this is not a very timely reply... but I use a nifty little app called "Show Desktop". It sits in the dock and one click...
  3. #2

    Default Re: Starting a desktop app from ASP.NET

    Are you trying to launch notepad per your example or a .net application. If
    the latter, what you're talking about is href exe, a very neat feature of
    ..net. You should probably search msdn and the windows application .net
    newsgroups.

    hth
    Eric


    "John Wright" <johnathan.w.wright@l-3com.com> wrote in message
    news:OcCSoBzRDHA.1576@TK2MSFTNGP12.phx.gbl...
    > I am trying to spawn a seperate process from my asp page
    > so when a user clicks the link or button a desktop program
    > is launched. This will be on an intranet and the program
    > will exist on the users desktop. I can use the following
    > code in webmatrix to run a process on my local machine:
    >
    > <%@ Page Language="VB" %>
    > <script runat="server">
    >
    > ' Insert page code here
    > '
    >
    > Sub Button1_Click(sender As Object, e As EventArgs)
    > Dim startInfo As System.Diagnostics.ProcessStartInfo
    > startInfo = New
    > System.Diagnostics.ProcessStartInfo()
    > Dim p As System.Diagnostics.Process = New
    > System.Diagnostics.Process()
    > startInfo.FileName = "c:\8133324.txt"
    > startInfo.WindowStyle =
    > System.Diagnostics.ProcessWindowStyle.Normal
    > p.Start("c:\winnt\notepad.exe")
    > End Sub
    >
    > </script>
    > <html>
    > <head>
    > </head>
    > <body>
    > <form runat="server">
    > <asp:Button id="Button1" onclick="Button1_Click"
    > runat="server" Text="Button"></asp:Button>
    > &nbsp;<!-- Insert content here -->
    > </form>
    > </body>
    > </html>
    >
    >
    > But in .NET Studio running on IIS the process doesn't
    > spawn. I have tried the following code:
    >
    > Dim startInfo As New ProcessStartInfo("IExplore.exe")
    > startInfo.WindowStyle = ProcessWindowStyle.Normal
    > Process.Start(startInfo)
    >
    > in a button click event, but nothing happens. Any help
    > would be greatly appreciated.
    > (Please send VB code, I know C# but this shop uses VB.NET
    > only)
    > John
    >
    >

    Eric Sabine Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139