Administrator

When Windows 10 came around it changed the startmenu layout to only one sublevel, everything else gets merged in the next higher folderstructure when displayed. Due to that i came up with this easy batch file to handle a Microsoft Windows 10 and other versions of windows installation.

@ECHO OFF
REM Ceck for Windows Version
for /f "tokens=3*" %%i IN ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName ^| Find "ProductName"') DO set WIN_VER=%%i %%j
REM Parse winversion for version to use goto
Echo.%WIN_VER% | FIND /I "XP">Nul && set OSVERSION=WINXP
Echo.%WIN_VER% | FIND /I "Windows 7">Nul && set OSVERSION=WIN7
Echo.%WIN_VER% | FIND /I "Windows 8">Nul && set OSVERSION=WIN8
Echo.%WIN_VER% | FIND /I "Windows 8.1">Nul && set OSVERSION=WIN81
Echo.%WIN_VER% | FIND /I "Windows 10">Nul && set OSVERSION=WIN10
Echo.%WIN_VER% | FIND /I "Server 2003">Nul && set OSVERSION=WINSERV2003
Echo.%WIN_VER% | FIND /I "Server 2008">Nul && set OSVERSION=WINSERV2008
Echo.%WIN_VER% | FIND /I "Server 2012">Nul && set OSVERSION=WINSERV2012
Echo.%WIN_VER% | FIND /I "Server 2016">Nul && set OSVERSION=WINSERV2016
REM DEBUG USE
ECHO %WIN_VER%
ECHO %OSVERSION%
IF %OSVERSION%=="" (GOTO END)
IF "%OSVERSION%"=="WIN10" (GOTO INSTALLWIN10) ELSE (GOTO INSTALLWINOTH)

:INSTALLWIN10
REM Windows 10 Installation commando
REM e.g. msiexec /qn /i program.msi TRANSFORMS=WINDOWS10.MST
REM then jump to after Windows other install

GOTO POSTWIN10INST

:INSTALLWINOTH
REM run installation for other Windows Versions here.
:POSTWIN10INST

:END
EXIT