Creating a welcoming batch file...

Page 1 of 2 12 LastLast

  1. Posts : 4
    Windows 7 Home Premium 64-bit (6.1, Build 7600)
       #1

    Creating a welcoming batch file...


    I need help creating batch file that will do the following...
    I want it to echo "Welcome (insert name here)."
    I want it to say "How are you today, good or bad?" [G, B]
    If G, I want it to display, "That's great to know, sir! Would you like me to open your homepage? [Y, N]
    If Y, I want it to execute cd C:\Program Files\Internet Explorer\iexplore.exe
    If N, I want it to EXIT
    If B, I want it to display "I'm terribly sorry to hear that. Would you like me to open Internet for You?"
    If Y, execute cd C:\Program Files\Internet Explorer\iexplore.exe
    If N, I want it to pause

    Any help would be great, because everytime I put in the commands, they don't work (I'm sure I'm not putting them in correctly). I do not understand much of the way Microsoft CMD help explains it, so please put it in examples and plain English! Thanks!
      My Computer


  2. Posts : 2,039
    Several, including Windows 7 x64 Ultimate
       #2

    Try this;

    Visual Command Line - Create Bat Files

    This gives you a visual interface where you can just click on the commands you want to use, and add any text etc. This then automatically generates the batch file you want;



    Regards....Mike Connor
      My Computer


  3. Posts : 8,679
    Windows 10 Pro x64
       #3

    This must be in .bat? Not in .exe file?
      My Computer


  4. Posts : 5,605
    Originally Win 7 Hm Prem x64 Ver 6.1.7600 Build 7601-SP1 | Upgraded to Windows 10 December 14, 2019
       #4

    Hi! kdm, welcome to 7F :)

    Where you "Save as type" are you saving the .bat as "All Files (*.*)" ?

    This page may be of some help: Windows CMD Commands

    Also: Batch Files - Create a Menu to Execute Commands
    Last edited by Anak; 09 Apr 2011 at 20:15. Reason: Found more examples, help.
      My Computer


  5. Posts : 4
    Windows 7 Home Premium 64-bit (6.1, Build 7600)
    Thread Starter
       #5

    I do not currently know understand the way the computer describes the commands. I need it in plain English, and I am saving the file as a .bat
      My Computer


  6. Posts : 5,605
    Originally Win 7 Hm Prem x64 Ver 6.1.7600 Build 7601-SP1 | Upgraded to Windows 10 December 14, 2019
       #6

    kooldudematt said:
    I do not currently know understand the way the computer describes the commands. I need it in plain English,
    That would be like doing your homework. Could you post what you have so far without all the "I want this. I want that"?
    Then we can learn together.

    kooldudematt said:
    and I am saving the file as a .bat
    Yes it would be correct to save the file with the .bat extension, as in kooldudematt.bat . That would be the Files name

    But,

    Where you "Save as type" are you saving the .bat as "All Files (*.*)" ?
    Attached Thumbnails Attached Thumbnails Creating a welcoming batch file...-kdm.jpg  
      My Computer


  7. Posts : 16,119
    7 X64
       #7

    Interesting app. I don't think it's going to help here tho.

    Batch file is not going to be very pretty - you might be beter doing a simple little app. - AutoIt or similar.
      My Computers


  8. Posts : 2,039
    Several, including Windows 7 x64 Ultimate
       #8

    SIW2 said:
    Interesting app. I don't think it's going to help here tho.

    Batch file is not going to be very pretty - you might be beter doing a simple little app. - AutoIt or similar.
    "Simple little apps" are rarely all that simple! Autoit is a prime example! :)

    I don't think a beginner cares much about the niceties of various coding examples, they are happy if it does the job.

    That application works very well, and they can see what they are doing.

    Regards....Mike Connor
      My Computer


  9. Posts : 16,119
    7 X64
       #9

    Yes , I am sure it does work well.

    Never seen it before - so thanks for the heads up.

    Not clear to me how it explains to the op what to do.

    As a completely separate second point - even if he does get it going - a command window won't look great.
      My Computers


  10. Posts : 2,039
    Several, including Windows 7 x64 Ultimate
       #10

    The program allows you to choose commands, explaining what they do. When you are finished the program writes the batch file for you.

    There is no command window involved when you start the .bat file.

    It is a good way to learn how to use various commands.



    Regards....Mike Connor
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 01:29.
Find Us