Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weird error running NT login script

Status
Not open for further replies.

javon7065

MIS
Dec 18, 2000
15
0
0
US
hello. I get the floowing message when tyring to run the nt login script from a particular workstation:

\\ntserver\netlogon
cmd.exe was started with the above path as the current directory. UNC paths are not supported

This error occured on a dual boot machine. I get the error when using Windows XP but not windows 2000. Has anyone ever seen this before? I have searched the usual places wtih no luck. thanks

joe
 
Yes, I've seen this error on 95 and NT.

I can't remember exactly why I got this error. I think I blamed the OS build.

As a test, I would create a new simple logon script...like:

edit logon.bat

in logon.bat, type:

net use R: \\servername\share

save this file in the netlogon directories.

Now, point a user to this logon script. Logon to each client OS and see if you get a problem. If you don't have a problem, I would say there is something wrong with your script Joseph L. Poandl
MCSE 2000

If your company is in need of experts to examine technical problems/solutions, please check out
 
This normally happens when you run the script manually (\\server\netlogon\logon.cmd (or logon.bat).

As the current directory will be \\server\netlogon, cmd.exe reports an error that the UNC paths are not supported for the current working directory. c:\winnt will be the current working directory, and execution of the batch file continues as normal.

Is this problem seen when logging in, or by forcing the execution of the batch file while logged in?

Slopple.

 
I did get that exact behavior when I ran the login script manually: The error appears but then the script runs. However, what I did was to make a copy of the script and put tons of pauses in it and assign it to my account. The verdict: Windows XP for some reason did not like the following syntax

IF ERRORLEVEL 1 THEN XXXXX

This script has alot of IF statements but this was the ONLY one that was not in this format:

IF NOT ERRORLEVEL 1 THEN XXXXXX

Until I commented this line out, the script was exiting prematurley. Very strange. Luckily I did not need that section anymore so I just commeneted it out complety. I guess if I needed it I could have made it say the same thing the other way:

IF NOT ERRORLEVEL 0

Weird one. thanks for you help and suggestions
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top