Execute DOS commands on client
-
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:
-
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:
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
-
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
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
-
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