# Preenter choice so you just have to press enter ?



## pasc (Jun 21, 2014)

So I have this part of a dos script:



> set /p choice=1. Remove DVD-Drives 2. Keep DVD-Drives:
> if %choice%==1 goto remdvdrive
> if %choice%==2 goto keepdvddrive


So it will look like this:


> 1. Remove DVD-Drives 2. Keep DVD-Drives: 2


I want it to show the user "2" as default option (so the only button that has to be pressed in most cases is the Enter Key)

How do I get it to display the two as choice by default ?

Thanks in advance


----------



## DaveBurnett (Nov 11, 2002)

Try http://www.robvanderwoude.com/choice.php


----------



## pasc (Jun 21, 2014)

So what would this probably look like in my example ?


----------



## DaveBurnett (Nov 11, 2002)

I'm sure you can work though the examples shown and work out what you want as well as I can. 

I don't write many DOS scripts.


----------



## foxidrive (Oct 20, 2012)

This is one way:


```
echo 1 : Remove DVD-Drives 
echo 2 : Keep DVD-Drives
echo(
set "choice=2"
set /p "choice=Type 1 or 2 [Or just press enter for 2 by default]: "
   if "%choice%"=="1" goto remdvddrive
   if "%choice%"=="2" goto keepdvddrive
```


----------



## pasc (Jun 21, 2014)

Perfect !


----------

