Minimize the DOS window [RESOLVED]-VBForums
Results 1 to 12 of 12

Thread: Minimize the DOS window [RESOLVED]

  1. #1

    Thread Starter
    Addicted Member jordan23's Avatar
    Join Date
    Dec 2002
    Posts
    166

    Minimize the DOS window [RESOLVED]

    How do I minimize the dos window when I run a batch file. I am running a couple setup files and I run a batch file from the Autorun.inf file but I want the dos window to minimize during the setups. Any ideas?
    Last edited by jordan23; Nov 1st, 2004 at 02:23 PM.

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901
    if you call it from a SHELL command, you can hide it.

    is there an ECHO OFF in the batch file?

  3. #3

    Thread Starter
    Addicted Member jordan23's Avatar
    Join Date
    Dec 2002
    Posts
    166
    @ECHO OFF keeps text off the DOS window but the window is still visible. I need it to be at least minimized.

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    have you tried

    open=yourbatch.bat /min


    ?
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  5. #5

    Thread Starter
    Addicted Member jordan23's Avatar
    Join Date
    Dec 2002
    Posts
    166
    Yeah, I tried that and it does not work. Thanks though.

  6. #6
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    try

    open=START /MIN mybatch.bat


    Maybe tht will work.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  7. #7

    Thread Starter
    Addicted Member jordan23's Avatar
    Join Date
    Dec 2002
    Posts
    166
    It gives me an error "Access to the specified device, path, or file is denied. "

  8. #8
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    bleck.



    how about this one

    open=cmd /C start /min mybat.bat
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  9. #9
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901
    I think you can shell from VB without showing a window. May be the hard way around it, but it may be possible.

  10. #10

    Thread Starter
    Addicted Member jordan23's Avatar
    Join Date
    Dec 2002
    Posts
    166
    You got it on the last one Cander, thanks. It was "open=cmd /C start /min mybat.bat"

  11. #11
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    w00t!

    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  12. #12
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901
    i didn't see it when I read online help for CMD. Should have consulted the books! Good to know!

    Now, I see cmd -> start /?

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.