Results 1 to 4 of 4

Thread: about .bat file run

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2006
    Posts
    125

    about .bat file run

    hi all:
    when i run the .bat file by using window application, it always pop out cmd.exe window. (i use (process.start() and it works, ). but i don't want everytime the cmd.exe pop out, so how can i make it run at background?

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jun 2006
    Posts
    125

    Re: about .bat file run

    any suggestion and ideas will be great helpful!
    many thanks....

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: about .bat file run

    You would use a ProcessStartInfo object and set its CreateNoWindow property to True. You should read about the Process.Start method. It is overloaded and it will explain the different ways you can start a process and how you can use a ProcessStartInfo object to control it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jun 2006
    Posts
    125

    Re: about .bat file run

    i try to set the process.startinfo.createnowindow=true, but the cmd.exe window still come out? can you tell me how to write the code please?
    i got one bat file called test.bat...and stored in c:\transspec\
    thanks

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