|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Run a DOS commandHi all
I'm very new to VB - I am trying to run a DOS command from within a VB2005 asp.net web site using a command button? The DOS command will take the form of the command followed by several switches! Any ideas examples gratefully accepted. P.S. If this is the wrong group please accept my apologies (and let me know where to post). Thanks in advance "Michael Roebuck" <mick.roeb***@ntlworld.com> wrote in message SHELL doesn't work from there?news:mYHNf.65959$K42.32109@newsfe7-win.ntli.net... > I'm very new to VB - I am trying to run a DOS command from within a VB2005 > asp.net web site using a command button? > > The DOS command will take the form of the command followed by several > switches! "Homer J Simpson" <nob***@nowhere.com> schrieb: .... or 'System.Diagnostics.Process.Start'...>> I'm very new to VB - I am trying to run a DOS command from within a >> VB2005 asp.net web site using a command button? >> >> The DOS command will take the form of the command followed by several >> switches! > > SHELL doesn't work from there? Note that some commands are actually part of the command shell "cmd.exe" (environment variable 'comspec'). Thus it's necessary to call "cmd.exe" instead of the command and pass the command as an argument ('Process.Start("cmd", "bla")'). -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> More precisely: Process.Start("cmd.exe", "/C <command> <switches and
parameters>"). Change /C to /K to keep the command prompt window around after the command finishes. Show quoteHide quote "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message news:Oam$LBlPGHA.1532@TK2MSFTNGP12.phx.gbl... > "Homer J Simpson" <nob***@nowhere.com> schrieb: >>> I'm very new to VB - I am trying to run a DOS command from within a >>> VB2005 asp.net web site using a command button? >>> >>> The DOS command will take the form of the command followed by several >>> switches! >> >> SHELL doesn't work from there? > > ... or 'System.Diagnostics.Process.Start'... > > Note that some commands are actually part of the command shell "cmd.exe" > (environment variable 'comspec'). Thus it's necessary to call "cmd.exe" > instead of the command and pass the command as an argument > ('Process.Start("cmd", "bla")'). > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://classicvb.org/petition/>
Comparing Colors
filter rows in a bound datagrid Problem: Unwanted Paper feed after printing. Change Report Connection at Runtime update more than only the email with asp.net membership Data Relation Update Namespace Question ... problems with URL value in webbrowser app Delimiter question File test |
|||||||||||||||||||||||