Window net use

 

 

 

echo map driver
@ECHO OFF
REM Create by datahunter

set USER=
set PW=
set SERVER=192.168.100.254


REM # Delay
ping "%SERVER%" -n 1 -w 1000 > nul


net use p: /delete  > nul  2>&1
net use r: /delte   > nul  2>&1
net use S: /delete  > nul 2>&1
net use m: /delete  > nul 2>&1


REM # Public
net use p: \\%SERVER%\Public    "%PW%"  /user:"%USER%" /PERSISTENT:no  > nul

REM # Sales
net use s: \\%SERVER%\Sales /PERSISTENT:no  > nul

 


 

Disable ANONYMOUS LOGON

 

anonymous login example:

Net use \\10.10.10.10\ipc$ /u:""

 

Disable it:

Login as "Administrator" and click "Start > Run".
Type "regedit" in the box and click "Ok" button
Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Change the value of "RestrictAnonymous" from "0" to "1"

 

 

Creative Commons license icon Creative Commons license icon