Added Script for SMB mounting

This commit is contained in:
2021-07-21 14:15:47 +02:00
parent 34ad1cc7c2
commit 488c330b43

View File

@@ -0,0 +1,20 @@
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