Solved

Help with login script error

Posted on 2004-09-22
11
984 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now