Files
win-remote-toolkit/examples/map-drive-S.cmd
2026-04-24 17:44:02 +08:00

39 lines
1020 B
Batchfile

@echo off
echo Setting up network drive S: for User account...
:: Map network drive with credentials
echo Mapping \\192.168.88.232\SALES to S: drive...
net use S: \\192.168.88.232\SALES /user:sales "S@a1es" /persistent:yes
if %errorlevel%==0 (
echo.
echo [SUCCESS] Network drive S: mapped successfully!
echo Target: \\192.168.88.232\SALES
echo Drive: S:
echo Username: sales
echo Access: Authenticated
echo.
echo Opening File Explorer to show the drive...
explorer /select,S:\
echo.
echo Drive S: is now available in File Explorer.
echo This mapping will persist after reboot.
echo.
) else (
echo.
echo [ERROR] Failed to map network drive S:
echo Please check:
echo - Network connectivity to 192.168.88.232
echo - Username: sales
echo - Password: S@a1es
echo - Share exists: \\192.168.88.232\SALES
echo.
)
echo.
echo This setup file will now delete itself...
timeout /t 5 /nobreak >nul
:: Self-delete this batch file
del "%~f0"
exit