Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 994
  • Last Modified:

Help with login script error

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
msadexchman
Asked:
msadexchman
  • 6
  • 4
1 Solution
 
etsolowCommented:
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
 
etsolowCommented:
Also, perhaps the copy statement is hanging on a "Overwrite file? (Yes/No/All):" prompt?
0
 
msadexchmanAuthor Commented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
etsolowCommented:
Change the line to:

copy K*.dll c:\windows /y

Hope that works!
0
 
msadexchmanAuthor Commented:
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
 
etsolowCommented:
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
 
msadexchmanAuthor Commented:
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
 
etsolowCommented:
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
 
msadexchmanAuthor Commented:
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
 
etsolowCommented:
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
 
darkdragoCommented:
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now