added homdrive mapper script
This commit is contained in:
parent
e9fba20c0b
commit
5c1e3646df
28
tools/maphome.cmd
Normal file
28
tools/maphome.cmd
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
@echo off
|
||||||
|
set PDC=192.168.6.1
|
||||||
|
set PDCNAME=GATEKEEPER
|
||||||
|
|
||||||
|
set BDC=192.168.89.1
|
||||||
|
set BDCNAME=KEYMASTER
|
||||||
|
|
||||||
|
set mydrive=H:
|
||||||
|
net use %mydrive% /DELETE
|
||||||
|
|
||||||
|
echo ####### %0 #######
|
||||||
|
|
||||||
|
for /f "tokens=2,* delims=:" %%A in ('ipconfig ^| find "Gateway"') do set GATEWAY=%%A
|
||||||
|
set GATEWAY=%GATEWAY:~1%
|
||||||
|
echo GATEWAY=%GATEWAY%
|
||||||
|
|
||||||
|
if /I %GATEWAY% == %PDC% (
|
||||||
|
echo using %PDCNAME% as HOMESERVER ...
|
||||||
|
net use %mydrive% \\%PDCNAME%\%USERNAME%
|
||||||
|
)
|
||||||
|
|
||||||
|
if /I %GATEWAY% == %BDC% (
|
||||||
|
echo using %BDCNAME% as HOMESERVER ...
|
||||||
|
net use %mydrive% \\%BDCNAME%\%USERNAME%
|
||||||
|
)
|
||||||
|
|
||||||
|
echo ####### %0 #######
|
||||||
|
|
Loading…
Reference in New Issue
Block a user