net use Y: \\newton\%username%$
if errorlevel 1 goto logoff
goto continue
:logoff
net send localhost "You are logged in elsewhere. Please log off a the other terminal before trying again."
logoff
:continue
setx homedrive "Y:"
setx homepath "\"
save the above lines to bat file use GPO login script file.
updated script if Y drive already exists
if exist Y:\ goto continue
:logoff
net send localhost "You are logged in elsewhere. Please log off a the other terminal before trying again."
logoff
exit
:continue
setx homedrive "Y:"
setx homepath "\"
exit
updated script if Y drive already exists
if exist Y:\ goto continue
:logoff
net send localhost "You are logged in elsewhere. Please log off a the other terminal before trying again."
logoff
exit
:continue
setx homedrive "Y:"
setx homepath "\"
exit
No comments:
Post a Comment