Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Execute DOS commands on client

Execute DOS commands on client

Scheduled Pinned Locked Moved Visual Basic
csharpasp-netsysadminhelp
4 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    toboyle
    wrote on last edited by
    #1

    Hello, I have spent considerable time trying to find out how to execute a DOS command (something that can be run from the command prompt on a windows machine) from ASP.NET/VB.NET. I have managed to launch a few processes on the server, but was unable to attach to them - and I had to reboot the server to kill them. In a nutshell: I use a series of databound pages to locate a device on an intranet. From there I want the user to be able to press a button and either PING the device or TELNET to it. It is suppose to save the user time...instead of having them opening up a DOS window and typing "PING -t mydevice" I want to send the command for them - and show them the results in a standard DOS window. Please help! Terry :confused:

    D 1 Reply Last reply
    0
    • T toboyle

      Hello, I have spent considerable time trying to find out how to execute a DOS command (something that can be run from the command prompt on a windows machine) from ASP.NET/VB.NET. I have managed to launch a few processes on the server, but was unable to attach to them - and I had to reboot the server to kill them. In a nutshell: I use a series of databound pages to locate a device on an intranet. From there I want the user to be able to press a button and either PING the device or TELNET to it. It is suppose to save the user time...instead of having them opening up a DOS window and typing "PING -t mydevice" I want to send the command for them - and show them the results in a standard DOS window. Please help! Terry :confused:

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      You'd have to use VBScript or Javascript code in the webpage that the client uses, not the server. Search for the WshShell object on MSDN. RageInTheMachine9532

      T 1 Reply Last reply
      0
      • D Dave Kreskowiak

        You'd have to use VBScript or Javascript code in the webpage that the client uses, not the server. Search for the WshShell object on MSDN. RageInTheMachine9532

        T Offline
        T Offline
        toboyle
        wrote on last edited by
        #3

        Thank you Dave - I found the information. Now, here's the rub... I need to pass the device name from VB.NET to the script (VBscript or Javascript). And let me be specific: I need a button on an .ASPX page that grabs the device name (that was dynamically created from a dataset in VB.NET - take that name and pass it to the WshShell object as a parameter. So I can execute the following on the client machine: ping -t Okay - I know I am close, but I want to make sure I pull this together correctly. Thanks again, Terry

        T 1 Reply Last reply
        0
        • T toboyle

          Thank you Dave - I found the information. Now, here's the rub... I need to pass the device name from VB.NET to the script (VBscript or Javascript). And let me be specific: I need a button on an .ASPX page that grabs the device name (that was dynamically created from a dataset in VB.NET - take that name and pass it to the WshShell object as a parameter. So I can execute the following on the client machine: ping -t Okay - I know I am close, but I want to make sure I pull this together correctly. Thanks again, Terry

          T Offline
          T Offline
          toboyle
          wrote on last edited by
          #4

          Dave, Quick correction: ping -t device_name I used greater than and less than on the first post.:zzz: Terry

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups