Page 1 of 1 1
Topic Options
#206170 - 2012-11-09 07:28 AM Environment is Incorrect
BradG Offline
Fresh Scripter

Registered: 2009-02-13
Posts: 12
Loc: Australia
Dont know if this is the correct forum for this, but this issue is really driving me nuts. We are using the Universal Login Script successfully on around 130 machines, but on 2 machines it simply fails to map the required network drives. the error generated is as follows:

2012/11/09 17:17:31 : DriveMap
Z: to \\sw.local\shares\sites\Camperdown\Users\op-cdn
The environment is incorrect.

I have been looking for a resolution for this for several days, but cannot get the Kix script to work on these 2 machines. The machines themselves are running Windows XP with SP2 applied.

Any help would be greatly appreciated.

Top
#206171 - 2012-11-09 11:56 AM Re: Environment is Incorrect [Re: BradG]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
You mean they're still on a Service Pack that came out on 8/10/2004 ? Service Pack 3 came out in 5/6/2008 and well over 300 post fixes since then.

Is it possible that these boxes are infected or have their path environment variables wrong?

What do the Event Logs say on these 2 computers?

Top
#206174 - 2012-11-09 03:04 PM Re: Environment is Incorrect [Re: NTDOC]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I don't see any actual code in the post. I thought that was a requirement in this forum.

Anyway... I do see a hyphen in the path. If not properly quoted, KIX might interpret it as a math operator.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#206177 - 2012-11-09 04:35 PM Re: Environment is Incorrect [Re: Les]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4557
Loc: USA
Les, he's referring to Glenn's Universal Logon Script, which is tokenized. In this case there really isn't much to post except maybe his ini file.
Top
#206178 - 2012-11-09 04:36 PM Re: Environment is Incorrect [Re: BradG]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4400
Loc: New Jersey
Please review the Login Script manual for support requests for the Universal Login Script. You can send the required files to me directly (gbarnas@...). This script is not supported in a public forum due to the potentially sensitive nature of the diagnostic information needed.

PM me here if you need further information. I will need the LoginDebug.log and the Login.INI file, along with the LoginError.Log if present.

I can verify that using version 2.0 or higher that the dash in the pathspec is not an issue.

If you have already sent these in the past week, I apologize and ask that you resend your email. We have been off the network due to Hurricane Sandy since 10/29, and came back online just yesterday.

Glenn

PS - moving this to the Lounge as it is not something that relates to public Kix code.
_________________________
Actually I am a Rocket Scientist! \:D

Top
#206221 - 2012-11-14 03:55 PM Re: Environment is Incorrect [Re: Glenn Barnas]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4400
Loc: New Jersey
Just an update - after working with Brad for a few days and providing him with a customized version of ULS with enhanced debugging data, we found that these two computers indeed had an invalid environment.

When logging in, the NET USE command always returned "Error 10 - The environment is invalid". Adding a "SET > UserEnv.txt" command to the login script showed that there were no variables defined in the environment (the file was empty!) - neither System or User environment variables were present. It was almost as if the registry was unavailable to initialize the environment. It didn't matter if the workstation was recently rebooted or had been on for a while - it happened consistently at login.

After the login completed and a command prompt was opened, the SET command displayed the environment and NET USE commands ran successfully.

The problem presented with any user as well as a new user profile. We checked network settings, (LM)Host file entries, verified that the system was not in a strange return from hibernate state, and a few other things such as verifying that the related login script files were saved in ANSI format and removing the cached copy of the config file. Google searches turned up nothing useful beyond dozens of sites with tables of error messages.

Since this issue was confined to just two of 100+ workstations, they were replaced and the problematic systems are scheduled for reimaging.

With this additional insight, I'm just wondering if anyone has any ideas as to why the environment would be blank during logon, yet operational moments later?

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#206226 - 2012-11-14 05:14 PM Re: Environment is Incorrect [Re: Glenn Barnas]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
no insight really.
I would have checked the eventlog for winlogon related errors.
_________________________
!

download KiXnet

Top
#206228 - 2012-11-14 06:50 PM Re: Environment is Incorrect [Re: Lonkero]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4557
Loc: USA
Not exactly the same problem, but I have run into a similar problem using runas. On about 3 machines so far, runas will simply not work. I can't remember the return error right this second. The only fix besides rebuilding the pc was to blow away their desktop profile and start new. Interestingly, one of these three pcs had the profile rebuilt, and within a week it was broken again.
Top
#206235 - 2012-11-16 10:40 PM Re: Environment is Incorrect [Re: Allen]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
Well imaging the system is certainly the faster approach as most of us just don't have enough time in our days to do academic research into an issue like this but if you did have time you could probably run a debugger on it to see if you can trap an error or maybe even a perfmon - but after a couple hours of checking stuff I'd image the box myself and move on unless it was something hitting a lot of boxes.
Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 581 anonymous users online.
Newest Members
Audio, Hoschi, Comet, rrosell, PatrickPinto
17880 Registered Users

Generated in 0.212 seconds in which 0.178 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org