Last active
December 14, 2015 11:29
-
-
Save allex/5079514 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM ===================================== | |
REM Auto mount host server user directory | |
REM By allex ([email protected]) | |
REM ===================================== | |
if exist Z:\ goto :eof | |
echo Connecting host server, please wait . . . | |
ping HOST -n 5 >nul | |
set host=HOST | |
set username=allex | |
set passwd= | |
set label=home | |
net use Z: \\%host%\%username% 123,qwe /user:%username% /p:no | |
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\##%host%#%username%" /v _LabelFromReg /d "%label%" /f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment