@echo off
cls
echo Dirver Installer v1.0

for /f %%i in ('ver^|find "5.0."') do echo Win NT && set osrecognized=1
for /f %%i in ('ver^|find "5.1."') do echo Win XP && set osrecognized=1
for /f %%i in ('ver^|find "5.2."') do echo Win 2003 && set osrecognized=1
for /f %%i in ('ver^|find "6.0."') do echo Win Vista && set osrecognized=1
for /f %%i in ('ver^|find "6.1."') do echo Win 7 && set osrecognized=1

if not defined osrecognized goto NotSupport

@if "%processor_architecture%"=="x86" ("%cd%/SmartPhoneDriver/x86/spinstall.exe" -remove -smartphonefeaturephone) ^
else ("%cd%/SmartPhoneDriver/x64/spinstall.exe" -remove -smartphonefeaturephone)

"%cd%/FeaturePhoneDriver/v1.1032.1/UninstallDriver.exe"

goto end

:NotSupport
echo Do Not support Win NT earlier version

:end
pause