Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Creating a welcoming batch file...


09 Apr 2011   #1

Windows 7 Home Premium 64-bit (6.1, Build 7600)
 
 
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 System SpecsSystem Spec
.

09 Apr 2011   #2

Several, including Windows 7 x64 Ultimate
 
 

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 System SpecsSystem Spec
09 Apr 2011   #3

Windows 7 Ultimate SP1 x64
 
 

This must be in .bat? Not in .exe file?
My System SpecsSystem Spec
.


09 Apr 2011   #4

Microsoft Community Contributor Award Recipient

Win 7 Home Premium 64bit Ver 6.1.7600 Build 7601 - SP1
 
 

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
My System SpecsSystem Spec
09 Apr 2011   #5

Windows 7 Home Premium 64-bit (6.1, Build 7600)
 
 

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 System SpecsSystem Spec
09 Apr 2011   #6

Microsoft Community Contributor Award Recipient

Win 7 Home Premium 64bit Ver 6.1.7600 Build 7601 - SP1
 
 

Quote   Quote: Originally Posted by kooldudematt View Post
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.

Quote   Quote: Originally Posted by kooldudematt View Post
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,

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


Attached Thumbnails
Creating a welcoming batch file...-kdm.jpg  
My System SpecsSystem Spec
09 Apr 2011   #7

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

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 System SpecsSystem Spec
09 Apr 2011   #8

Several, including Windows 7 x64 Ultimate
 
 

Quote   Quote: Originally Posted by SIW2 View Post
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 System SpecsSystem Spec
10 Apr 2011   #9

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

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 System SpecsSystem Spec
10 Apr 2011   #10

Several, including Windows 7 x64 Ultimate
 
 

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 System SpecsSystem Spec
Reply

 Creating a welcoming batch file...




Thread Tools



Similar help and support threads for2: Creating a welcoming batch file...
Thread Forum
Solved Batch File that grabs file names from folder to insert into batch file General Discussion
Solved Creating Batch File with Robo Copy General Discussion
Help required creating batch file to read .csv file General Discussion
Creating .batch to run at shutdown Performance & Maintenance
Help creating a batch file to auto login to a website General Discussion
Help Needed Creating Batch File General Discussion
Help creating batch file General Discussion

Our Sites

Site Links

About Us

Find 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 07:22 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33