Error 53 - Network Path was not found
<p>first post of mine on this website, used to lurk but I've recently had a bit of a pickle with a batch-file </p>

<p>I've been working as a small little simple auto connect batch-command which auto-connects my laptop to my schools shared network server but for some odd reason I am unable to connect as the command prompt prints <em>"System Error 53 has occurred The network path was not found."</em>
If anyone could shed some light as to what I'm doing wrong would be much appreciated.</p>

<pre><code>@echo off

:: BatchGotAdmin
:-------------------------------------
REM  --&gt; Check for permissions
IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
&gt;nul 2&gt;&amp;1 "%SYSTEMROOT%\SysWOW64\cacls.exe"     "%SYSTEMROOT%\SysWOW64\config\system"
) ELSE (
&gt;nul 2&gt;&amp;1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
)

REM --&gt; If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) &gt; "%temp%\getadmin.vbs"
set params = %*:"=""
echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 &gt;&gt; "%temp%\getadmin.vbs"

"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /B

:gotAdmin
pushd "%CD%"
CD /D "%~dp0"
:--------------------------------------
setlocal
:PROMPT
SET /P AREYOUSURE="Are you sure you want to add School's shared documents? (Y/[N]):"
IF /I "%AREYOUSURE%" NEQ "Y" GOTO END

echo Please enter the Username you use to login to school computers
set /p username=Enter your Username(SCHOOL USERNAME):

echo Please enter the Password you use to login to school computers
set /p password=Enter your Password(SCHOOL PASSWORD):

net use Z: "\\server1\shared_documents$\" "%password%" /user:\Students\"%username%" /persistent:yes

TIMEOUT /T 5 /NOBREAK

:END
endlocal
</code></pre>