Results 1 to 5 of 5

Thread: How to run a .bat file without opening a window

  1. #1
    Join Date
    Oct 2010
    Posts
    53

    How to run a .bat file without opening a window

    I am making use of "run as" for running a .bat file. This starts a .fwd file. This is working and I don’t have any problem in running that but the only problem that I am facing is that I am forced to end the window through the dos command (file .bat). I don’t want to close the Window. If it is possible and you know that how can I do that then please l post over here. It will be very useful for me and other users who are searching for the solution for the same.

  2. #2
    Join Date
    Nov 2009
    Posts
    1,416

    Re: How to run a .bat file without opening a window

    I think that I have understood that what you need to do. Have you tried to use the Exit command? If not then you should type the Exit command in the end of your batch file and this will do it. I asked this to one of my friends who is expert in DOS commands. You should try this and see whether it does what you want to do. Thank you.

  3. #3
    Join Date
    Nov 2009
    Posts
    1,292

    Re: How to run a .bat file without opening a window

    You can use the "cmd /c <program>" for running the batch file. You will find that the shell will get exit once the program exits. You need not to give details well what is starting what. You might use the start command, as in "[cmd /c]start /b <program>". If you want to see that how can you use that then you can run the command "cmd /?" and/or "start /?” This will show you all the details about that.

  4. #4
    Join Date
    Nov 2009
    Posts
    1,269

    Re: How to run a .bat file without opening a window

    If you want to run the .bat file or .CMD file in minimized mode then ;you can follow the steps given below.
    1. First of all you have to create a shortcut for the .BAT or .CMD file. For that you have to right click on that file select send to desktop. This will create a shortcut for this on the desktop.
    2. Right click on that file and select the properties.
    3. In the Run: drop down, choose Minimized
    4. Click on Ok button.
    5. Now double click on that shortcut and this will run the batch file in minimized windows state.

  5. #5
    Join Date
    Nov 2008
    Posts
    1,185

    Re: How to run a .bat file without opening a window

    Windows Script Host’s Run Method permits to run the .BAT or .CMD files in the invisible mode. It’s very simple and you can do it very easily.
    Code:
    Set WshShell = CreateObject("WScript.Shell" ) 
    WshShell.Run chr(34) & "C:\Batch Files\syncfiles.bat" & Chr(34), 0 
    Set WshShell = Nothing
    You have to copy the lines given above and paste that in the notepad. Save this file with .VBS extension. Now you have to edit the name for the .BAT file and the path for it accordingly. Save that file and double click on the .VBS file and this will run that in invisible mode.

Similar Threads

  1. How to stop opening a new window every time in chrome
    By Eeshika18 in forum Technology & Internet
    Replies: 4
    Last Post: 25-02-2012, 10:57 AM
  2. Google Chrome v13 Dev channel crash on opening new window
    By Iquau in forum Technology & Internet
    Replies: 6
    Last Post: 12-09-2011, 10:50 PM
  3. Replies: 4
    Last Post: 27-11-2010, 05:59 AM
  4. Replies: 6
    Last Post: 20-08-2010, 12:35 AM
  5. Folders Keep Opening In New Window
    By alex.john95 in forum Operating Systems
    Replies: 4
    Last Post: 14-04-2009, 06:25 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,046,431.77092 seconds with 17 queries