Call Batch file from VB
-
Hi Friends, Help me how to call batch file from visual basic. i created batch file like.... net use \\serverl\saal1 /user:admin 123456 The purpose of calling the batch file is, when i connect to the application (VB) before giving login details it should connect to the above server. So i m creating that as a batch file and have to call when my application starts. Please help me. Regards,
-
Hi Friends, Help me how to call batch file from visual basic. i created batch file like.... net use \\serverl\saal1 /user:admin 123456 The purpose of calling the batch file is, when i connect to the application (VB) before giving login details it should connect to the above server. So i m creating that as a batch file and have to call when my application starts. Please help me. Regards,
If you're using VB6 then you can use the Shell statement. If you're using .NET you can something like this :
System.Diagnostics.Process pcBatch = new System.Diagnostics.Process(); pcBatch.StartInfo.FileName = sFileName; pcBatch.Start();