C
CoffeeMan
The login script I use works well in my peer-to-peer environment, except
when I want it to be executed at startup.
My computer has automatic loging into main account (using TweakUI) and the
login script is executed at startup but can't map any share drive (Error
67). I tried both share names and IP with NET USE command. Weirdly enough,
the SAME script launched manually just a few seconds after startup works
well.
- If I login into Windows with a logon screen (classic or XP-Style), the
script will works because Windows will have finished to startup in
background. If Windows autologon using TweakUI, the script won't work, like
if it was running few seconds to early. Lauching it manually after startup
and the script will work.
- Same behavior with Prefetch. If the prefetch directory is empty, the
script will work. If the prefetch is not empty, Windows starts faster and
the script won't work when launched the first time. I have to launched it
manually
The only solution I found is to "wake up" the LAN by pinging it quite a few
times, but then the login delay is tedious.
Here is the script:
@echo off
Title Connection
echo Connection en cours
Ping serveur -n 1 | find " TTL="
if errorlevel 1 goto WakeIt
goto NoWake
:WakeIt
Title Connection **
ping localhost -n 20
Ping serveur -n 1
:NoWake
net use R: "\\serveur\data" /persistent:No
net use S: "\\serveur\lib" /persistent:No
net use T: "\\serveur\musique" /persistent:No
Ping bureau -n 1 | find " TTL="
if errorlevel 1 goto NoBureau
net use U: "\\bureau\data" /persistent:no
net use V: "\\bureau\lib" /persistent:no
:Nobureau
Ping famille -n 1 | find " TTL="
if errorlevel 1 goto NoFamille
net use w: "\\famille\lib" /persistent:no
:Nofamille
* * *
My guess is that this error 67 is related to master browsing delay.
Anyway suggestion to solve this?
when I want it to be executed at startup.
My computer has automatic loging into main account (using TweakUI) and the
login script is executed at startup but can't map any share drive (Error
67). I tried both share names and IP with NET USE command. Weirdly enough,
the SAME script launched manually just a few seconds after startup works
well.
- If I login into Windows with a logon screen (classic or XP-Style), the
script will works because Windows will have finished to startup in
background. If Windows autologon using TweakUI, the script won't work, like
if it was running few seconds to early. Lauching it manually after startup
and the script will work.
- Same behavior with Prefetch. If the prefetch directory is empty, the
script will work. If the prefetch is not empty, Windows starts faster and
the script won't work when launched the first time. I have to launched it
manually
The only solution I found is to "wake up" the LAN by pinging it quite a few
times, but then the login delay is tedious.
Here is the script:
@echo off
Title Connection
echo Connection en cours
Ping serveur -n 1 | find " TTL="
if errorlevel 1 goto WakeIt
goto NoWake
:WakeIt
Title Connection **
ping localhost -n 20
Ping serveur -n 1
:NoWake
net use R: "\\serveur\data" /persistent:No
net use S: "\\serveur\lib" /persistent:No
net use T: "\\serveur\musique" /persistent:No
Ping bureau -n 1 | find " TTL="
if errorlevel 1 goto NoBureau
net use U: "\\bureau\data" /persistent:no
net use V: "\\bureau\lib" /persistent:no
:Nobureau
Ping famille -n 1 | find " TTL="
if errorlevel 1 goto NoFamille
net use w: "\\famille\lib" /persistent:no
:Nofamille
* * *
My guess is that this error 67 is related to master browsing delay.
Anyway suggestion to solve this?