This repository has been archived on 2023-05-21. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
SysTools/DeployTools/MountSMBShare_Example.cmd

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