Run .exe from WebForm

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

  1. #1

    Default Run .exe from WebForm

    How can I run an .exe (located at the server) from within
    a WebForm? For example, run "word.exe mydoc.txt"
    mg Guest

  2. Similar Questions and Discussions

    1. asp.net how to login to AD from a webform
      I have a webserver 2003 and a AD server 2003, I need to create an intranet app and I want the users login to the Webserver using their AD...
    2. Component in WebForm
      Greetings, Is it possible to get a reference to the Page object of an ASP.NET page from within a Component that has been placed on the page? I...
    3. Help! How to use MSMQ in webForm?
      Help!!How to use MSMQ in WebForm? I can not send any Message from MSMQ?
    4. Including WebForm Image Control in a Webform Table Control
      What is the code for including an image control in a Table control of a WebForm ???? regards
    5. applet in a webform
      I have an applet that I instantiate on a web form using an applet tag such as: <Applet> stuff in here </Applet> Assume the name of the applet...
  3. #2

    Default Re: Run .exe from WebForm

    You can use:

    System.Diagnostics.Process.Start("cmd.exe")

    But if you are actually intending to use Word, that's not the way. Instead,
    you'll want to investigate the Office interop components.

    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrrefofficeprimaryinteropassemblies.asp[/url]

    Ken

    "mg" <mg@theworld.com> wrote in message
    news:011801c35475$af912e20$a301280a@phx.gbl...
    How can I run an .exe (located at the server) from within
    a WebForm? For example, run "word.exe mydoc.txt"


    Ken Cox [Microsoft MVP] Guest

  4. #3

    Default Re: Run .exe from WebForm

    I ran

    private void Page_Load(object sender, System.EventArgs e)
    {
    System.Diagnostics.Process.Start("cmd.exe");
    }

    and

    private void Page_Load(object sender, System.EventArgs e)
    {
    System.Diagnostics.Process.Start("c:\\Program
    Files\\Microsoft Office\\Office\\WinWord.exe");
    }

    but nothing happened.

    ???


    >-----Original Message-----
    >You can use:
    >
    >System.Diagnostics.Process.Start("cmd.exe")
    >
    >But if you are actually intending to use Word, that's not
    the way. Instead,
    >you'll want to investigate the Office interop components.
    >
    >[url]http://msdn.microsoft.com/library/default.asp?[/url]
    url=/library/en-
    us/dv_wrcore/html/wrrefofficeprimaryinteropassemblies.asp
    >
    >Ken
    >
    >"mg" <mg@theworld.com> wrote in message
    >news:011801c35475$af912e20$a301280a@phx.gbl...
    >How can I run an .exe (located at the server) from within
    >a WebForm? For example, run "word.exe mydoc.txt"
    >
    >
    >.
    >
    mg Guest

  5. #4

    Default Re: Run .exe from WebForm

    What did you want to happen? The Web service doesn't have a way to show you
    the desktop so there's nothing to see.

    "mg" <mg@theworld.com> wrote in message
    news:072001c3550a$0d623640$a401280a@phx.gbl...
    I ran

    private void Page_Load(object sender, System.EventArgs e)
    {
    System.Diagnostics.Process.Start("cmd.exe");
    }

    and

    private void Page_Load(object sender, System.EventArgs e)
    {
    System.Diagnostics.Process.Start("c:\\Program
    Files\\Microsoft Office\\Office\\WinWord.exe");
    }

    but nothing happened.

    ???


    >-----Original Message-----
    >You can use:
    >
    >System.Diagnostics.Process.Start("cmd.exe")
    >
    >But if you are actually intending to use Word, that's not
    the way. Instead,
    >you'll want to investigate the Office interop components.
    >
    >[url]http://msdn.microsoft.com/library/default.asp?[/url]
    url=/library/en-
    us/dv_wrcore/html/wrrefofficeprimaryinteropassemblies.asp
    >
    >Ken
    >
    >"mg" <mg@theworld.com> wrote in message
    >news:011801c35475$af912e20$a301280a@phx.gbl...
    >How can I run an .exe (located at the server) from within
    >a WebForm? For example, run "word.exe mydoc.txt"
    >
    >
    >.
    >

    Ken Cox [Microsoft MVP] Guest

  6. #5

    Default Re: Run .exe from WebForm

    If possible, I'd like to open a program like notepad
    programatically ... Ideally on the client (where the
    WebForm is running in a browser), or at the server (where
    IIS is running) ?
    >-----Original Message-----
    >What did you want to happen? The Web service doesn't
    have a way to show you
    >the desktop so there's nothing to see.
    >
    >"mg" <mg@theworld.com> wrote in message
    >news:072001c3550a$0d623640$a401280a@phx.gbl...
    >I ran
    >
    >private void Page_Load(object sender, System.EventArgs e)
    >{
    >System.Diagnostics.Process.Start("cmd.exe");
    >}
    >
    >and
    >
    >private void Page_Load(object sender, System.EventArgs e)
    >{
    >System.Diagnostics.Process.Start("c:\\Program
    >Files\\Microsoft Office\\Office\\WinWord.exe");
    >}
    >
    >but nothing happened.
    >
    >???
    >
    >
    >
    >>-----Original Message-----
    >>You can use:
    >>
    >>System.Diagnostics.Process.Start("cmd.exe")
    >>
    >>But if you are actually intending to use Word, that's not
    >the way. Instead,
    >>you'll want to investigate the Office interop components.
    >>
    >>[url]http://msdn.microsoft.com/library/default.asp?[/url]
    >url=/library/en-
    >us/dv_wrcore/html/wrrefofficeprimaryinteropassemblies.asp
    >>
    >>Ken
    >>
    >>"mg" <mg@theworld.com> wrote in message
    >>news:011801c35475$af912e20$a301280a@phx.gbl...
    >>How can I run an .exe (located at the server) from within
    >>a WebForm? For example, run "word.exe mydoc.txt"
    >>
    >>
    >>.
    >>
    >
    >
    >.
    >
    mg 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