summaryrefslogtreecommitdiffstats
path: root/6-network.bat
diff options
context:
space:
mode:
authorPeter2018-11-17 02:57:17 +0000
committerPeter2018-11-17 02:57:17 +0000
commit1efc700929cef8e99ab2d54a119ad38335110085 (patch)
treed6e3d4eaada706745cdac1bf218dba01743be708 /6-network.bat
parentc8b8716bc349173deae7990901182fe8a376faf2 (diff)
downloadwin10-prep-1efc700929cef8e99ab2d54a119ad38335110085.tar.gz
win10-prep-1efc700929cef8e99ab2d54a119ad38335110085.tar.bz2
win10-prep-1efc700929cef8e99ab2d54a119ad38335110085.zip
Small updates
Diffstat (limited to '6-network.bat')
-rw-r--r--6-network.bat14
1 files changed, 11 insertions, 3 deletions
diff --git a/6-network.bat b/6-network.bat
index 39b7f84..6992501 100644
--- a/6-network.bat
+++ b/6-network.bat
@@ -1,4 +1,12 @@
rem connect to network shares
-net use Z: \\atlas\media /USER:%username% /PERSISTENT:YES
-net use Y: \\atlas\vault /USER:%username% /PERSISTENT:YES
-net use X: \\atlas\downloads /USER:%username% /PERSISTENT:YES \ No newline at end of file
+set server=atlas
+ping -n 1 %server% | find "TTL=" >nul
+if errorlevel 0 ( goto connect ) else ( goto no_connect )
+
+:connect
+net use Z: \\%server%\media /USER:%username% /PERSISTENT:YES
+net use Y: \\%server%\vault /USER:%username% /PERSISTENT:YES
+net use X: \\%server%\downloads /USER:%username% /PERSISTENT:YES
+
+:no_connect
+:eof \ No newline at end of file