time wait period in login script

N

news.microsoft.com

hi,
recently moved user home folders from one win2k dc to win2k member server...
since then can't get login script to map home folder..it however maps other
folders on new server no probs.

it appears it tries to map user's home variable before it's properly
defined.. hence if you give it a 5 second wait period and run it then it
works..

is there a 'sleep' type command in win2k i can use in the logon script as a
workaround to give it a 5 second wait period?

taken from login script as per below...
-----------------------------
net use s: \\hercules\PRI - works
net use x: \\hercules\xhosting - works ok

rem Map user home directory
if exist h:\*.* net use h: /delete /yes
net use h: /home - does not work when run
first time afterlogon.


thanks in advance.
 
P

Pegasus \(MVP\)

news.microsoft.com said:
hi,
recently moved user home folders from one win2k dc to win2k member server...
since then can't get login script to map home folder..it however maps other
folders on new server no probs.

it appears it tries to map user's home variable before it's properly
defined.. hence if you give it a 5 second wait period and run it then it
works..

is there a 'sleep' type command in win2k i can use in the logon script as a
workaround to give it a 5 second wait period?

taken from login script as per below...
-----------------------------
net use s: \\hercules\PRI - works
net use x: \\hercules\xhosting - works ok

rem Map user home directory
if exist h:\*.* net use h: /delete /yes
net use h: /home - does not work when run
first time afterlogon.


thanks in advance.

Here is how you can insert a delay in a batch file:

ping localhost -n 5 > nul

I am a little sceptical about your suspicion of having
a timing issue. You can probably test your theory
by modifying your logon batch file like so:

net use s: \\hercules\PRI - works
net use x: \\hercules\xhosting - works ok

rem Map user home directory
echo User name=%UserName%
net user %UserName% | find /i "home"
pause
if exist h:\*.* net use h: /delete /yes
net use h: /home

If there was a timing issue then neither %UserName%
nor the subsequent examination of the home directory
setting would give you the expected result.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

login script does not working 2
Login scripts 4
Login Script 1
Smart Login Script 8
Creating new login script using Ifmember.exe 0
logon script won't run..on logon 1
Drive Mapping Script 2
login script 1

Top