»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 10-08-2003, 01:06 PM   #1 (permalink)
Registered User
 
Join Date: Oct 2002
Location: Ytown, OH
Posts: 192
tbird2340 is on a distinguished road
Is it possible to ask a question in a batch file?

I'm creating a batch file and I wanted to know if it was possible to do the following.

I have the following so far:

DEL C:\DIR\DOCUMENTATION\*.PDF

PAUSE

NET USE /DELETE Z:

NET USE Z: \\SERVER\INSTALL

"Z:\PROGRAM NAME 2.05\SETUP.EXE"

PAUSE

After this I want to do ask the user a question

WOULD YOU LIKE TO INSTALL PROGRAM B?

And if they hit Y then it goes down to the next line in the batch file whereas if the hit N it skips over the next line. Is something like this possible or is the a solution that produces similar results?

Thanks!

tbird2340 is offline   Reply With Quote
Old 10-08-2003, 01:14 PM   #2 (permalink)
Registered User
 
meese's Avatar
 
Join Date: Jun 2003
Location: NJ
Posts: 1,096
meese is on a distinguished road
You can do what you want. There was another thread recently with good links to writing batch files. Try doing a search for batch files in this forum.

Here's the thread:

http://www.techimo.com/forum/showthr...ht=batch+files

Last edited by meese; 10-08-2003 at 01:18 PM.
meese is offline   Reply With Quote
Old 10-08-2003, 11:42 PM   #3 (permalink)
Registered User
 
muno's Avatar
 
Join Date: Oct 2001
Location: Finland
Posts: 3,838
muno is on a distinguished road
Send a message via Yahoo to muno
That can be accomplished with choice.

I think it goes something like this->
choice /c:yn
if errorlevel 2 goto noinstall
echo Installing the stupid program
z:\setup.exe
:noinstall
echo You chose not to install the stupid program


However, you might need 'choice.com' from the dos disks.
-M
muno is offline   Reply With Quote
Old 10-09-2003, 06:04 AM   #4 (permalink)
Registered User
 
Join Date: Oct 2002
Location: Ytown, OH
Posts: 192
tbird2340 is on a distinguished road
Thanks a lot!!
tbird2340 is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 02:56 AM.