Skip to content

Instantly share code, notes, and snippets.

@wongsyrone
Last active August 8, 2016 00:12
Show Gist options
  • Save wongsyrone/785908da557e20ce12bd to your computer and use it in GitHub Desktop.
Save wongsyrone/785908da557e20ce12bd to your computer and use it in GitHub Desktop.
Windows 10 File sharing solution
@echo off
net session >nul 2>nul
if ERRORLEVEL 1 (
color 4F
echo Run as Administrator
pause & break
exit
)
:CHOICE
echo Windows 10 File sharing solutions
echo.
echo 1: Setup several services
echo 2: Reconfigure network
echo 3: Reinstall IPv4 protocols
echo 4: Reset TCPIP stack
echo.
set /P UserChoice="Choose: "
set UserChoice=CASE_%UserChoice%
cd /D "%~dp0"
goto %UserChoice%
:CASE_1
:: Net Connection
sc config Netman start= demand
sc start Netman
:: Remote Access Connection Manager
sc config RasMan start= auto
sc start RasMan
:: Remote Access Auto Connection Manager
sc config RasAuto start= auto
sc start RasAuto
:: Telephony
sc config TapiSrv start= auto
sc start TapiSrv
:: Connected User Experiences and Telemetry
:: solve getting stuck on Win 10
:: disable tracking
sc config DiagTrack start= disabled
sc stop DiagTrack
:: TCP/IP NetBIOS Helper
sc start lmhosts
pause
cls
goto :CHOICE
:CASE_2
echo.
echo We will logout after configuraion
pause & break
::Network Setup service
sc config NetSetupSvc start= auto
sc start NetSetupSvc
ping -n 5 127.0.0.1 >nul
shutdown /l
pause
cls
goto :CHOICE
:CASE_3
echo.
echo We will reboot after configuraion
pause & break
netsh interface ipv4 install
ping -n 5 127.0.0.1 >nul
shutdown /r /t 3
pause
cls
goto :CHOICE
:CASE_4
echo.
echo We will reboot after configuraion
pause & break
netsh interface ipv4 reset
netsh interface ipv6 reset
netsh winsock reset
ping -n 5 127.0.0.1 >nul
shutdown /r /t 3
pause
cls
goto :CHOICE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment