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

Recommended Answers

All 2 Replies

Not yet, Ill try it first.tnx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.