Results 1 to 2 of 2

Thread: execute .bat file [resolved]

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870

    execute .bat file [resolved]

    Hi,

    how do i execute a .bat file from vb.net?

    Cheers
    Nick

    sorted!
    Code:
    Dim proc As New Process()
    proc.StartInfo.FileName = "c:\file.bat"
    proc.Start()
    Last edited by nswan; Mar 2nd, 2004 at 10:24 AM.
    www.vb-tech.com
    .Net Freelance Development
    http://weblog.vb-tech.com/nick
    My blog

  2. #2
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: execute .bat file [resolved]

    Originally posted by nswan
    Hi,

    how do i execute a .bat file from vb.net?

    Cheers
    Nick

    sorted!
    Code:
    Dim proc As New Process()
    proc.StartInfo.FileName = "c:\file.bat"
    proc.Start()
    you could pass the file name in the new constructor also, just to make it easier

    dim proc as new process("C:\file.bat")
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width