Click here to Skip to main content
16,006,531 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB bound data combo boxes. Pin
ahulting11-May-10 6:14
ahulting11-May-10 6:14 
AnswerRe: VB bound data combo boxes. Pin
William Winner11-May-10 6:21
William Winner11-May-10 6:21 
GeneralRe: VB bound data combo boxes. Pin
ahulting11-May-10 6:28
ahulting11-May-10 6:28 
QuestionHow to run a .bat file in vb application? Pin
Orchid8510-May-10 19:17
Orchid8510-May-10 19:17 
AnswerRe: How to run a .bat file in vb application? Pin
Abhinav S10-May-10 19:46
Abhinav S10-May-10 19:46 
AnswerRe: How to run a .bat file in vb application? Pin
Johan Hakkesteegt11-May-10 3:34
Johan Hakkesteegt11-May-10 3:34 
AnswerRe: How to run a .bat file in vb application? Pin
Luc Pattyn11-May-10 4:19
sitebuilderLuc Pattyn11-May-10 4:19 
GeneralRe: How to run a .bat file in vb application? Pin
Orchid8511-May-10 20:33
Orchid8511-May-10 20:33 
Thanks a lot for the all answers,
I wrote below codes in my application:

 <br />
<code>
Dim BatchFile as string ="C:\RunScript.bat"
Dim StrView As String = "C:\Myview.sql"
Dim psi As System.Diagnostics.ProcessStartInfo = New System.Diagnostics.ProcessStartInfo(BatchFile, String.Format("-S {0} -d {1} -U {2} -P {3} -i {4}", txtMachineName.Text, txtSourceDB.Text, txtUserName.Text,txtPassword.Text, StrView ))
Dim proc As System.Diagnostics.Process = New System.Diagnostics.Process()
proc.StartInfo = psi
proc.Start()


When I run the application, all the above codes are executed but when I check the result, it seems that the batch file does not run.
Is there any problem in my code?
Could you please give me an example.


To Luc:
Thanks for reply, but I do not understand exactly what does below code mean?
Process.Start("cmd.exe", "/C batchFile.bat all the parameters");
Could you please give me an example.

Many thanks,
Orchid
GeneralRe: How to run a .bat file in vb application? Pin
Luc Pattyn12-May-10 1:43
sitebuilderLuc Pattyn12-May-10 1:43 
AnswerRe: How to run a .bat file in vb application? Pin
The Man from U.N.C.L.E.11-May-10 7:02
The Man from U.N.C.L.E.11-May-10 7:02 
QuestionCannot load control [ControlName]; license not found. Pin
Andraw Tang10-May-10 10:53
Andraw Tang10-May-10 10:53 
AnswerRe: Cannot load control [ControlName]; license not found. Pin
William Winner10-May-10 11:02
William Winner10-May-10 11:02 
AnswerRe: Cannot load control [ControlName]; license not found. Pin
DaveAuld10-May-10 11:24
professionalDaveAuld10-May-10 11:24 
GeneralRe: Cannot load control [ControlName]; license not found. Pin
Andraw Tang10-May-10 11:30
Andraw Tang10-May-10 11:30 
GeneralRe: Cannot load control [ControlName]; license not found. Pin
DaveAuld10-May-10 11:43
professionalDaveAuld10-May-10 11:43 
GeneralRe: Cannot load control [ControlName]; license not found. Pin
Andraw Tang10-May-10 11:45
Andraw Tang10-May-10 11:45 
GeneralRe: Cannot load control [ControlName]; license not found. Pin
DaveAuld10-May-10 11:48
professionalDaveAuld10-May-10 11:48 
GeneralRe: Cannot load control [ControlName]; license not found. Pin
Andraw Tang10-May-10 11:50
Andraw Tang10-May-10 11:50 
GeneralRe: Cannot load control [ControlName]; license not found. Pin
Andraw Tang10-May-10 12:01
Andraw Tang10-May-10 12:01 
GeneralRe: Cannot load control [ControlName]; license not found. Pin
DaveAuld10-May-10 12:05
professionalDaveAuld10-May-10 12:05 
GeneralRe: Cannot load control [ControlName]; license not found. [modified] Pin
Johnny J.11-May-10 1:06
professionalJohnny J.11-May-10 1:06 
GeneralRe: Cannot load control [ControlName]; license not found. Pin
Andraw Tang11-May-10 3:43
Andraw Tang11-May-10 3:43 
GeneralRe: Cannot load control [ControlName]; license not found. Pin
Johnny J.11-May-10 4:02
professionalJohnny J.11-May-10 4:02 
GeneralRe: Cannot load control [ControlName]; license not found. Pin
Andraw Tang11-May-10 4:06
Andraw Tang11-May-10 4:06 
GeneralRe: Cannot load control [ControlName]; license not found. [modified] Pin
Johnny J.11-May-10 4:14
professionalJohnny J.11-May-10 4:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.