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
kooldudematt

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
Mike Connor

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
StalkeR

Windows 7 Ultimate SP1 x64
 
 

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


09 Apr 2011   #4
Anak

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
kooldudematt

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
Anak

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
-kdm.jpg  
My System SpecsSystem Spec
09 Apr 2011   #7
SIW2

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
Mike Connor

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
SIW2

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
Mike Connor

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
Thread Forum
Creating the PPPOE internet connection using batch file
I have a PPPoE internet connetion from my ISP. Every time I want to access the internet connection I have to goto the setting and in that I have to open it and then have to dial it. This is the traditional way to log in but I wanted to make a batch file in which the PPPoE user name and password is...
Network & Sharing
Windows 7 creating blank txt file after running a batch script
I have the following batch script @echo off setlocal enableextensions set "baseName=dnshistory" set "count=0" for /f "delims=%baseName%." %%a in (
General Discussion
Batch File that grabs file names from folder to insert into batch file
Ok I'm totally at a loss on how to word this so I'm just going to write it out the best that I can... :confused: First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg. Here's the code that I'm using: ffmpeg -i...
General Discussion
Creating Batch File with Robo Copy
Hi I am currently running the following to supposedely create a directory IE V:\Backup Folder\Pictures\Backup 21-05-2012 robocopy /e "c:\users\jon\pictures" "v:\Backup Folder\Pictures\Backup %date:~-10,2%-%date:~-7,2%-%date:~-4,4%" Evrything works fine except the backed up pictures folder is...
General Discussion
Help creating a batch file to auto login to a website
I have created the following batch file to automatically load and login to a site, I created it and tested it on a computer running xp, but I can't get it to work on a windows 7 machine... "@ECHO OFF TITLE Water Monitor Auto Start Up mode con: cols=42 lines=1 REM Create a time delay...
General Discussion
Help Needed Creating Batch File
Hi, I have 2 files that are in the same directory which I want to start one after the other. I have created a simple batch file like this which opens 2 files at the same time. Example Start Server.exe Start Game.exe
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 19:33.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App