I'm trying to create a bat file with two sets of choices, but would like it to display only one set of choices depending on the os architecture. As written when ran on Win10 x64 it only displays the :x64 options, but when running on Win7 x86 it is displaying both :x64 and :x32 choices. I'll be adding the options to this once I have the choice logic working. I'm new to creating bat files and need some advise on how to complete this. Thank you.
@echo off
:: Installed OS
Set _Bitness=64
IF %PROCESSOR_ARCHITECTURE% == x86 (
IF NOT DEFINED PROCESSOR_ARCHITEW6432 Set _Bitness=32
)
Echo Your Operating System is %_Bitness% bit
If "%_Bitness%"==32 goto x32
If "%_Bitness%"==64 goto x64
@echo off
:x32
echo Select Unmanaged Workstation Type:
echo =============
echo -
echo 1) 32Bit CPACS Workstation
echo 2) 32Bit RPACS Workstation
echo 3) 32Bit Sleep Workstation
echo 4) 32Bit Vendor Workstation
@echo off
:x64
echo Select Unmanaged Workstation Type:
echo 5) 64Bit CPACS Workstation
echo 6) 64Bit RPACS Workstation
echo 7) 64Bit Sleep Workstation
echo 8) 64Bit Vendor Workstation
echo -
set /p op=Type option:
if "%op%"=="1" goto op1
if "%op%"=="2" goto op2
if "%op%"=="3" goto op3
if "%op%"=="4" goto op4
if "%op%"=="5" goto op5
if "%op%"=="6" goto op6
if "%op%"=="7" goto op7
if "%op%"=="8" goto op8
echo Please Pick an option:
Aucun commentaire:
Enregistrer un commentaire