21 lines
842 B
Batchfile
21 lines
842 B
Batchfile
REM #############################################################
|
|
REM # @description: #
|
|
REM # Will presistently mount a SMB share and set label #
|
|
REM # #
|
|
REM # @project: IMGSystTools #
|
|
REM # @author: Bram Prieshof #
|
|
REM #############################################################
|
|
|
|
|
|
REM Save UserName and password
|
|
CMDKEY /ADD:<RemoteIP-Hostname> /USER:<RemoteUserName> /PASS:<RemotePass>
|
|
|
|
REM Set label
|
|
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\##<RemoteIP-Hostname>#<RemoteFolder> /v _LabelFromReg /t REG_SZ /f /d "<Label>"
|
|
|
|
REM Mount NetworkShare
|
|
NET USE P: \\<RemoteIP-Hostname>\<RemoteFolder> /PERSISTENT:YES /SAVECRED
|
|
|
|
|
|
|