#73557 - 2003-03-04 09:07 PM
Re: Problem with kixtart and NT4.0
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Add:
$script = $user.loginscript ? "Logon script error: @error @serror"
after the line "checking user"
|
Top
|
|
|
|
#73558 - 2003-03-04 09:10 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Aww geez now I get this:
'\\Sussex1\NETLOGON' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.
Error = 0 - The operation completed successfully. checking user: CN=Kix Test ory - The directory property cannot be found in the cache.script" (Active Direct ) [-2147352567/80020009]
checking user: CN=Test User ory - The directory property cannot be found in the cache.script" (Active Direct ) [-2147352567/80020009]
If no user was displayed, then no user was retrieved from the OU C:\WINDOWS>
|
Top
|
|
|
|
#73559 - 2003-03-04 09:12 PM
Re: Problem with kixtart and NT4.0
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I have seen some ADSI COM calls fail and the text line used inconjuction with a "+$user.loginscript" will cause a failure is the property is not defined.
So to get around that issue assign it to a variable first and check @error to see if you got it or not.
I have updated the script to use this method. See below.
code:
Break ON ; uncomment the next line to step through the code ; Debug ON ; Example of LDAP call. GetObject("LDAP://ou=Users,ou=YourBusinessUnit,dc=YourCompany,dc=com") ; You need to know your LDAP connection. You can maybe find it by checking the propery details on the OU for your users. $target = GetObject("LDAP://OU=Test,OU=Information Systems,OU=AdminBldg,DC=sussexcounty,DC=net") ? 'Error = '+@ERROR+' - '+@SERROR $loginscript="logon.bat" For Each $user in $target ? 'checking user: '+$user.name $script = $user.loginscript ? Logon swcript error: @error - @serror" ? 'assigned login script: '+$script If $Script <> $loginscript ? "Current Script for " +$user.name " is: " +$script+ " Should be: " +$loginscript $user.loginscript=$loginscript ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat. ? 'Error = '+@ERROR+' - '+@SERROR $user.SetInfo ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat. ? 'Error = '+@ERROR+' - '+@SERROR ? "Changed current Script for " +$user.name " to: " +$user.loginscript EndIf Next ? 'If no user was displayed, then no user was retrieved from the OU'
|
Top
|
|
|
|
#73560 - 2003-03-04 09:14 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
However the script is sort of working. If I manually assign kix32 in the user's logon script box. And if I then run this script it changes it to logon.bat, but if there is currently nothing in there it gives me what I posted previously.
|
Top
|
|
|
|
#73561 - 2003-03-04 09:17 PM
Re: Problem with kixtart and NT4.0
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
You need to trap the fact (error) that the logon script has never been assigned.
Something like this should help the situation. code:
Break ON $rc=SETOPTION('WrapAtEOL','ON')
; uncomment the next line to step through the code ; Debug ON ; Example of LDAP call. GetObject("LDAP://ou=Users,ou=YourBusinessUnit,dc=YourCompany,dc=com") ; You need to know your LDAP connection. You can maybe find it by checking the propery details on the OU for your users. $target = GetObject("LDAP://OU=Test,OU=Information Systems,OU=AdminBldg,DC=sussexcounty,DC=net") ? 'Error = '+@ERROR+' - '+@SERROR $loginscript="logon.bat" For Each $user in $target ? 'checking user: '+$user.name $script = $user.loginscript $loginscripterror = @error ? "Logon script error: @error - @serror" ? 'assigned login script: '+$script If $Script <> $loginscript or $loginscripterror ? "Current Script for " +$user.name " is: " +$script+ " Should be: " +$loginscript $user.loginscript=$loginscript ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat. ? 'Error = '+@ERROR+' - '+@SERROR $user.SetInfo ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat. ? 'Error = '+@ERROR+' - '+@SERROR ? "Changed current Script for " +$user.name " to: " +$user.loginscript EndIf Next ? 'If no user was displayed, then no user was retrieved from the OU'
{edit} added quote on line 17 [ 04. March 2003, 21:23: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#73562 - 2003-03-04 09:17 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
With the newly changed script I get this now:
'\\Sussex1\NETLOGON' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.
Error = 0 - The operation completed successfully. checking user: CN=Kix Test
ERROR : unknown command [Logon]! Script: \\Sussex1\NETLOGON\LDAP Call.kix Line : 17
C:\WINDOWS>
|
Top
|
|
|
|
#73563 - 2003-03-04 09:19 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
hold on don't post more yet. I am going to try that last code that was posted and report the results.
|
Top
|
|
|
|
#73564 - 2003-03-04 09:21 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Ok last result here is what I got:
'\\Sussex1\NETLOGON' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.
Error = 0 - The operation completed successfully. checking user: CN=Kix Test Logon script error: 0 - The operation completed successfully. assigned login script: logon.bat checking user: CN=Test User Logon script error: 0 - The operation completed successfully. assigned login script: logon.bat If no user was displayed, then no user was retrieved from the OU C:\WINDOWS>
|
Top
|
|
|
|
#73565 - 2003-03-04 09:21 PM
Re: Problem with kixtart and NT4.0
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Forgot a quote:
? "Logon script error: @error - @serror"
|
Top
|
|
|
|
#73567 - 2003-03-04 09:25 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Ok for Howard's post. I fixed the quotes and it works. It automatically added the logon.bat in each user's profile in that OU.
With what NTDOC is posting will that interfere with that you are already showing me Howard or is that in addition?
|
Top
|
|
|
|
#73570 - 2003-03-04 09:38 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
I meant this part
Ballistic.
From a Windows 2000 workstation or XP workstation.
Copy KIX32.EXE and your script to a folder locally on that box.
Then from a command line type as an example in the TEMP folder if you copied the file there.
C:\TEMP\KIX32.EXE LDAP.KIX
(or what ever the name of your script is) it should work.
Why should I do or not do this?
|
Top
|
|
|
|
#73571 - 2003-03-04 09:46 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Ok I tested it on XP Pro, Check 2000 Pro, Check 98SE, No good. Says bad command or filename. Is there something that needs to be changed in my logon.bat or my kixscript that maybe 98SE initially cannot read.
That is the last thing and I am finished.
|
Top
|
|
|
|
#73572 - 2003-03-04 09:53 PM
Re: Problem with kixtart and NT4.0
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Why are you testing this script on all those operating systems? Only you will run this one time from your work station.
Or are you now testing the logon script on these computer? Please try to include enough info for us to follow exactly what is happening.
|
Top
|
|
|
|
#73574 - 2003-03-04 09:56 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
I am just testing it on a 98 box. Full paths like C:\yadda\yadda, etc like that not UNC's. Hmm not sure how to do that for the 98 boxes Because the netlogon folder on sussex1 which is the domain controller I am not mapping to any of the clients. It is just shared and that's it.
|
Top
|
|
|
|
#73576 - 2003-03-05 02:15 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Ok I ended up using the overkill batch file in thread http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=1;t=006464
At any rate, it automatically copied kix32 and the supporting dll's to the 98 client. I login with the 98 client and the script runs. However one funny qwerky thing that is happening is that it only maps some of the drives and not all of them that are mapped using the same user logging into a 2000, NT, or XP box. Any thoughts? I can see the light at the end of the tunnel I am almost finished with this whole thing.
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 539 anonymous users online.
|
|
|