Solved

Help with login script error

Posted on 2004-09-22
11
986 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
  • 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Many people tend to confuse the function of a virus with the one of adware, this misunderstanding of the basic of what each software is and how it operates causes users and organizations to take the wrong security measures that would protect them ag…
Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
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.

830 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