1. I don't think there is any other command for cmd.exe...
2. @ is a batch symbol which only applies to batch files, or interactive
cmd.exe. Your process is running cmd.exe with commands (I suspect), and not
running a batch where @ applies.
> 2. @ is a batch symbol which only applies to batch files, or interactive
> cmd.exe. Your process is running cmd.exe with commands (I suspect), and not
> running a batch where @ applies.
If this is the case you could first create the batch file with the
necessary commands and then use the Process class to execute the batch
file. Just be sure to make sure your application has adequate
permission to do so on the client machine.
Thanks,
Seth Rowe
Academia - 01 Oct 2007 14:42 GMT
All I want to do is change the prompt without echo.
Is there some way (without using a batch file) that I could effectively
do.
sMyProcess.StartInfo = StartInfo
sMyProcess.Start()
Dim SWIn As System.IO.StreamWriter = sMyProcess.StandardInput
SWIn.WriteLine("@prompt $G")
...
Maybe an argument??
Thanks
>> 2. @ is a batch symbol which only applies to batch files, or interactive
>> cmd.exe. Your process is running cmd.exe with commands (I suspect), and
[quoted text clipped - 9 lines]
>
> Seth Rowe
> 2. @ is a batch symbol which only applies to batch files, or interactive
> cmd.exe. Your process is running cmd.exe with commands (I suspect), and
> not
> running a batch where @ applies.
All I want to do is change the prompt without echo.
Is there some way (without using a batch file) that I could effectively
do.
sMyProcess.StartInfo = StartInfo
sMyProcess.Start()
Dim SWIn As System.IO.StreamWriter = sMyProcess.StandardInput
SWIn.WriteLine("@prompt $G")
...
Maybe an argument??
Thanks
Family Tree Mike - 01 Oct 2007 15:53 GMT
I believe you would need to change the environment variable for the PROMPT,
then use that environment for the process.start. I don't think a command
argument for cmd.exe exists for this.
> > 2. @ is a batch symbol which only applies to batch files, or interactive
> > cmd.exe. Your process is running cmd.exe with commands (I suspect), and
[quoted text clipped - 17 lines]
>
> Thanks
Academia - 01 Oct 2007 21:31 GMT
thanks for the help
>I believe you would need to change the environment variable for the PROMPT,
> then use that environment for the process.start. I don't think a command
[quoted text clipped - 23 lines]
>>
>> Thanks
rowe_newsgroups - 01 Oct 2007 16:52 GMT
> > 2. @ is a batch symbol which only applies to batch files, or interactive
> > cmd.exe. Your process is running cmd.exe with commands (I suspect), and
[quoted text clipped - 17 lines]
>
> Thanks
How about this:
///////////////////////
'// Thanks to Wikipedia for giving me this
'// simple batch file
Dim filePath As String = "C:\MyFile.bat"
Using sw As New StreamWriter(filePath, False)
sw.WriteLine("@echo off")
sw.WriteLine("echo Hello, World!")
sw.WriteLine("pause > nul")
End Using
Dim p As Process = Process.Start(filePath)
p.WaitForExit(2500)
File.Delete(filePath)
//////////////////////
Thanks,
Seth Rowe
Academia - 01 Oct 2007 21:32 GMT
Thanks, I'll try that
>> > 2. @ is a batch symbol which only applies to batch files, or
>> > interactive
[quoted text clipped - 44 lines]
>
> Seth Rowe