Does it rely on any environment variables specific to the machines?
Printable View
Does it rely on any environment variables specific to the machines?
Dont think so.
Its the simplest script ever.
the only comands in it are xcopy, net use, and echo.
there are a few normal variables - %DATE%, %TIME%, %USERNAME%, %SystemRoot% & %USERPROFILE%.
there is one hidden share name in it for the log [as u can see from the snippets above].
And it works fine on every other laptop.
Nath
OK, if you run any batch file such as:
echo hello
pause
from a location on a UNC path you will get that message. I assumed that you could get around it by cd'ing, but that apparently isn't the case (i've just tested it). Have you tried adding a "pause" at the start of the script to make sure that it isn't doing it really quickly on the others.
Is the login script setting completely identical in all user accounts you've used?
As did i when u mentioned it heheQuote:
Originally Posted by sahmeepee
Just tried a script consisting of just what you have there and removed the other one from logon. Exactly the same result with the error message.
"on the others"?Quote:
Originally Posted by sahmeepee
The rest of the commands are executing fine - its just the error message and in turn, doesnt perform what it is meant to for some reason.
The log in script applies to user who is a member of the domain staff group and is logging onto a laptop.Quote:
Originally Posted by sahmeepee
The script is attached to the user config of the GPO - so that it executes when they logon [basically for ease of use to the user - if it was computer based, they'd have to restart should they need a 'start menu refresh'].
It was working for at least two other users [that i have seen] and reportedly working fine for others - just this one laptop it doesnt work on and i notice this message. I tried on my staff user and does the same as it does on the user of the laptop.
Any ideas?
Nath
Found this on system error 85
Another thing to try isQuote:
net use /persistent:yes is default settings for NT and win2000/XP. If you have mapped some network drives and check the reconnect at logon, or your network uses logon script to map network drives, the mapped network drives may show red Xs. If you enable echo and pause the logon script or if using net use to map the same drive manually, you may get "System error 85 has occurred. The local device name is already in use." One thing you may want to try is using net use /persistent:no, for example, net use i: \\servername\folder /persistent:no
(where X: is the drive letter in questionCode:net use x: /delete
Doesn't work correctly in XP SP2.Quote:
%0
Can you expand on that Geoff? In what way doesn't it work correctly?
There is a KB article on it. I shall attempt to find it but it's difficult to search for. The % get's filtered out by search engines.
Hmm interesting.... :-k
This appears to be a problem if you have mulitple occurances of %0 on a line of the script or if the %0 occurs at the start of the line.
Another interesting point to note is that on XP the command processor for logon scritps must automagically CD to the share where the script lives.
This makes the %0 redundant.
p.s. the last modification date for the cited KB article is in 2003 which predates the release of XP SP2. So strictly speaking this isn't something peculariar to SP2 :p .Quote:
0% is not required for Microsoft Windows NT, Microsoft Windows 2000, or Windows XP. It is required for Microsoft Windows 95, Microsoft Windows 98, and Microsoft Windows Millennium Edition (Me)
Yes, also if you have:
the options get dropped.Code:%0\Something\something.exe option1 option2
um..... kinda lost now guys ;)
Discovered that it is happening on other laptops also.
I've tried replacing the xcopy command with a robocopy method too, but the result is the same...
instead of copying the start menu from the mapped share at Z:, it copies the My Documents folder [or possibly the networked home dir [H:] that My Documents is redirected too on desktop pc's] into the start menu instead...
Not too fussed about the error message - just cant get the thing to work.
Any one want to see the crappy script? ;)
Nath
Yeah, come on.. post the code and we'll have a look :)
Yeah, Nath. Don't leave us the geeks slathering in anticipation. Post the blessed thing :)
no laughing in the back now :PCode:@ECHO OFF
REM ECHO _
ECHO. >> \\<servername>\<sharename>$\test.log
ECHO -START- %DATE% - %TIME% - SYNCING LAPTOP START MENU for %USERNAME% - >> \\<servername>\<sharename>$\test.log
REM ECHO __
ECHO -STAGE1- %DATE% - %TIME% - connection to server - >> \\<servername>\<sharename>$\test.log
net use Z: \\<servername>\<profileshare>$\Pre2k\Staff\Laptop /PERSISTENT:NO
REM ECHO ___
ECHO -STAGE2- %DATE% - %TIME% - COPYING START MENU TO LOCAL PROFILE - >> \\<servername>\<sharename>$\test.log
robocopy "Z:\Start Menu" "%USERPROFILE%\Start Menu" *.* /E /Z /NDL /NFL /NJH /LOG+:\\<servername>\<sharename>$\test.log
REM ECHO ____
ECHO -STAGE3- %DATE% - %TIME% - dis-connecting from server - >> \\<servername>\<sharename>$\test.log
net use Z: /DELETE
REM ECHO _____
ECHO -COMPLETE- %DATE% - %TIME% - Process over for %USERNAME% - >> \\<servername>\<sharename>$\test.log
As you can see, its a very simple script and the crazy thing is that even if you have a script of "echo hello world" and nothing else, you still get the CMD error thing.
Is there something else that i'm forgetting with this? permissions or something perhaps?
As it appears to be doing the same thing [above in the other post] for all the other laptops, i reckon ppl are gonna get narky real quick.
I already had the /persistant:no and a /delete after the job is done [not new at batch script writing - tho i dont get too complicated if i can help it hehe].
Any thoughts would be very welcome.
Nath.