Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Call Batch file from VB

Call Batch file from VB

Scheduled Pinned Locked Moved Visual Basic
sysadminhelptutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aaraaayen
    wrote on last edited by
    #1

    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,

    S 1 Reply Last reply
    0
    • A aaraaayen

      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,

      S Offline
      S Offline
      soporificeffect
      wrote on last edited by
      #2

      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();

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups