Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Computers for Beginners (https://www.askmehelpdesk.com/forumdisplay.php?f=79)
-   -   Creating batch file (https://www.askmehelpdesk.com/showthread.php?t=363352)

  • Jun 10, 2009, 01:42 AM
    ubharedev
    Creating batch file
    Hi,
    I have created batch file and saved with .bat from notepad.

    And I wanted to run that file on startup of my computer but I don't want to see that black DOS window while batch file is running on startup.

    Is there any other keyword or statements that I can put in batch file that will hide itself while running.

    Please tell thanks in advanced.
  • Jun 10, 2009, 03:59 AM
    Perito

    If you've dropped it in your Startup folder, it will run. You can enter a "Pause" statement" (Pause alone on a line) to cause the batch file to wait for user input. It will say "Press any key to continue.. . "
  • Jun 10, 2009, 05:05 AM
    ubharedev

    I don't want it to ask for any input,
    I just want that batch file should run in background.
    I don't want to see that DOS interface while batch file is running.
    I should run in background, without knowing to me, on startup.
  • Jun 10, 2009, 05:09 AM
    Perito
    OK. I misunderstood.

    There is nothing you can put in a batch file to hide the DOS window and keep it from appearing. Sorry.
    You can put "@echo off" at the top of the batch file. This will prevent anything from being written to the DOS window and may speed up processing. It might be possible to speed up processing to where you won't see the DOS window.

    You can also change the way a batch file is called in file types options of the shortcut. Call it with a command line like this: "START /MINIMIZED /WAIT COMMAND.COM /C [mybat.bat]". This has a side-effect: you will see a button on the task bar. Also put "EXIT" as the last line in the batch file so the window will close itself.

    It that doesn't work, the only other option I can think of is to write a small application (if you're a programmer) that will do what you want it to do and hide the main window. VBScript can be used.
  • Jul 20, 2009, 02:45 AM
    ubharedev

    Thanks for reply Perito,

    I have converted batch file to exe ghost application through batch to exe converter software.
    Now it doesn't show DOS window on startup.
  • Aug 3, 2009, 08:01 AM
    Dont treadonme

    It's time you learn to use:

    AutoIt Script Home Page

  • All times are GMT -7. The time now is 05:53 PM.