Added Script for SMB mounting
This commit is contained in:
20
DeployTools/MountSMBShare_Example.cmd
Normal file
20
DeployTools/MountSMBShare_Example.cmd
Normal 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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user