Solved

Help with login script error

Posted on 2004-09-22
11
989 Views
Last Modified: 2012-05-05
Scenario:  We're migrating our users from NT to AD however we still have alot of Win98 machines.  In order to update the client for MS networks registry setting on the users desktops, I've put together a kixtart script which makes the neccessary change to the registry.  I've tested the script by putting into the NT user accounts profile and watch a test user authenticate, call the script, then the window that says "Your windows logon script is running" appears in the upper left hand corner.  From there, the DOS window comes up and runs the kix script which is part of the .bat login script.  

My problem is, that "Your Windows logon script is running" message will not go away.  After I wait a substantial amount of time, I hit "Cancel", it goes away then I check the registry and confirm everything worked great.  The domain is updated to point to the new AD domain.  But I HAVE TO GET THAT WINDOWS MESSAGE TO DISAPPEAR.  My goal would be for it to not even pop up because I'm afraid a user might see it and hit "cancel" which would in turn jeopardize the kixtart script from running.

Here is the output of the kixtest.bat file which is going to be placed into the user NT account profile.  From there, I'll paste the Changereg.kix test script.  What am I doing wrong?

kixtest.bat

net use K: \\pdcservername\netlogon
K:
copy K*.dll c:\windows
kix32.exe Regchange.kix
net use /d /yes K:
exit

output of regchange.kix

if @producttype "windows 98"
 
writevalue ("hkey_local_machine\system\currentcontrolset\services\msnp32\networkprovider", "authenticatingagent", "addomainname", "reg_sz")
 
writevalue ("hkey_local_machine\system\currentcontrolset\services\vxd\vnetsup", "workgroup", "addomainname", "reg_sz")
endif
exit

Again, my whole issue is getting that Window to dissappear.

Thanks!
0
Comment
Question by:msadexchman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
11 Comments
 
LVL 2

Expert Comment

by:etsolow
ID: 12127438
As a test, to determine what is hanging, REM out all the lines in the kixtest.bat.  If that works, unREM them one at a time.  Once you determine which line is causing the problem, post back.  If it still hangs with all the lines REMmed out, you've got a problem that's not related to the batch file, I guess!
0
 
LVL 2

Expert Comment

by:etsolow
ID: 12127459
Also, perhaps the copy statement is hanging on a "Overwrite file? (Yes/No/All):" prompt?
0
 

Author Comment

by:msadexchman
ID: 12127513
Ok, first things first.  I just put a REM in front off every line in kixtest.bat.  tested the user logon again, script ran, then the screen went away!!!

I'm going to try the line by line thing and post back.  Regarding the copy statement hanging, that might be the case because I run this a number of times on the same machine meaning those K*.dll files have already been copied to c:\windows.  What switch do you recommend that I put in?

Let me see what happens with rem'ing out line by line

thanks for your help
0
WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

 
LVL 2

Expert Comment

by:etsolow
ID: 12127550
Change the line to:

copy K*.dll c:\windows /y

Hope that works!
0
 

Author Comment

by:msadexchman
ID: 12127599
PROGRESS!  I rem'd out lines 1 & 2 and it still disappeared, however, when I rem'd out line 3 which essentially changes the drive letter to K:, it hangs.  After doing the net use K: \\pdc\netlogon on line #2, is it mandatory that I put K: (to change to that drive letter prior to executing the copy command) on line #3?

Thoughts?

Thanks
0
 
LVL 2

Expert Comment

by:etsolow
ID: 12127644
If you don't change to K:, you'll have to provide the full path in your copy statement, ie:

copy k:\k*.dll c:\windows /y
0
 

Author Comment

by:msadexchman
ID: 12127684
ok..

on a hunch, I removed the 3rd line (K:) and ran the script.  The window disappeared, however, the K*.dll files were never copied to the c:\windows folder.  

let me try your suggestion on providing the full path....

we're getting close, I can feel it
0
 
LVL 2

Expert Comment

by:etsolow
ID: 12127700
See comment above your last post ;)

Also, you'll need to change your kix line to:

k:\kix32.exe k:\Regchange.kix

...assuming that's where those files are located.
0
 

Author Comment

by:msadexchman
ID: 12127852
You just got your 50 points!!!

Here is how the code looks now:

echo off
net use K: \\pdc\netlogon
copy K:\K*.dll c:\windows /y
K:\kix32.exe K:\regchange.kix
net use /d /yes K:
exit

This works!!!  

Now guess what?  I just learned from the Novell engineer at my client that the netware script uses all of the drive letters in the present script!!!!!!!!!!!!!!!!!!!!!!!!!!
0
 
LVL 2

Accepted Solution

by:
etsolow earned 50 total points
ID: 12127882
You're saying that there are no drive letters available for you?

How about:

echo off
copy \\pdc\netlogon\K*.dll c:\windows /y
\\pdc\netlogon\kix32.exe \\pdc\netlogon\regchange.kix
exit

0
 
LVL 1

Expert Comment

by:darkdrago
ID: 12128374
maybe instead of using kix you could make a reg file with the changes you need done then have it import the settings with something like this
pushd \\someserver\wheretheregfileis
regedit /s somefile.reg
popd
and then that could make the changes you need.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction How to create multiboot configuration with XP\Vista and Windows 7 on it? And most important question - how to do this correctly so not to have any kind of nightmares we get when system gets screwed? First of all one should realize t…
Introduction Often we come across situations wherein our batch files would be needing to reboot Windows for a variety of reasons. A few of them would be like: (1) Setup files have been updated whose changes can take effect only after a reboot …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Suggested Courses

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question