Comment Re:Smart enough... (Score 1) 515
I have a drive I need to mount when I'm in the office.
I don't remember the exact reason why I didn't want to make it persistent across reboots, (probably because it annoyed me when I wasent in the office and would try and reconnect)
Paste the following into a bat file.
----------------
@echo off
net use > %temp%\NetDrives.txt
findstr
if %errorlevel% equ 0 goto alreadymapped
net use * \\Server\Folder PASSWORD
net use > %temp%\NetDrives.txt
set _foundit=No
for
if %_foundit% EQU No goto error
start explorer %_foundit%
goto end
echo Some kind of error.
echo type 'net use' to see whats wrong
pause
del %temp%\NetDrives.txt > nul
--------------------
A very simple bat file would be
-----------
net use * \\Server\Folder PASSWORD
pause
------------