0

Hi, I would like to map a network at log off. I created a .bat file (pls see below) and added in group policy edit - user configuration - windows settings - scripts - logoff, but still it wont map.

Thanks


==============
@echo off

if exist W:\ goto else
net use W: "\\Storage\pdf" /USER:storage\administrator password /PERSISTENT:NO
goto endif
:else
net use W: /d
net use W: "\\Storage\pdf" /USER:storage\administrator password /PERSISTENT:NO
:endif

if exist X:\ goto else
net use X: "\\Storage\xml" /USER:storage\administrator password /PERSISTENT:NO
goto endif
:else
net use X: /d
net use X: "\\Storage\xml" /USER:storage\administrator password /PERSISTENT:NO
:endif

if exist Y:\ goto else
net use Y: "\\Storage\data" /USER:storage\administrator password /PERSISTENT:NO
goto endif
:else
net use Y: /d
net use Y: "\\Storage\data" /USER:storage\administrator password /PERSISTENT:NO
:endif

if exist Z:\ goto else
net use Z: "\\Storage\asc" /USER:storage\administrator password /PERSISTENT:NO
goto endif
:else
net use Z: /d
net use Z: "\\Storage\asc" /USER:storage\administrator password /PERSISTENT:NO
:endif

exit

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by rgdadabear
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.