Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


xpd

xpd

Geek of Coastguard
14115 posts

Uber Geek
+1 received by user: 4574

Retired Mod
ID Verified
Trusted
Lifetime subscriber

#19918 6-Mar-2008 13:12
Send private message

Hiyas,

Im trying to whip up a batch file with a user input menu...
ie: Press 1 for x program, 2 for y program etc....

Everywhere I look keeps referring to the "choice" command, which unfortunately is of no use to me as this script will be running in a Win XP enviroment and "choice" is not part of XP.

So I found a script which kinda did what I wanted so have scavenged what I can from it to se eif I can get it working for me, however whenever a choice is selected, the script just exits with no errors or result.

Below is what Ive got so far.... Im probably way off track or stuffing up somewhere but thats why Im here asking for help :)


========================
@echo off
echo                1. Wellington
echo                2. Manurewa
echo                L. Other
echo                Q. Quit


set ChoiceMenu=''
set /p ChoiceMenu=%sChoice% (1,2,L,Q) :
if '%ChoiceMenu%'=='l' GOTO Other
if '%ChoiceMenu%'=='L' GOTO Other
if '%ChoiceMenu%'=='q' GOTO exit
if '%ChoiceMenu%'=='Q' GOTO exit
if '%ChoiceMenu%'=='1' GOTO wel
if '%ChoiceMenu%'=='2' GOTO man



wel: start c:\windows\system32\mstsc.exe -console -v:192.181.125.200

man: start c:\windows\system32\mstsc.exe -console -v:192.181.125.201

========================

Ideas/fixes/money appreciated :)





XPD / Gavin

 

LinkTree

 

 

 


Create new topic

xpd

xpd

Geek of Coastguard
14115 posts

Uber Geek
+1 received by user: 4574

Retired Mod
ID Verified
Trusted
Lifetime subscriber

#115006 6-Mar-2008 13:21
Send private message

Think I found a fix :)

Was following the original script too literally and was using options that wernt needed.....  hehe... 




XPD / Gavin

 

LinkTree

 

 

 


Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.