#73479 - 2003-02-25 09:01 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Assign the logon.bat to each user in my domain are you serious? Hell yes that's too much considering there are about 1000 users.
If I can assign it to an OU then that is fine. But I tried assigning a logon.bat but for some reason it doesn't run. Maybe I am calling the script incorrectly in the logon.bat
What should it look like? Considering my many various client OS's.
|
Top
|
|
|
|
#73480 - 2003-02-25 09:28 PM
Re: Problem with kixtart and NT4.0
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Assigning a proper logonscript to an account (1 or ALL) is a trivial matter in both NT4 and W2K.
But have you seen this thread: Assign script in Group Policy
NT4 policies suck. I would FDISK computers that had them. [ 25. February 2003, 21:37: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#73485 - 2003-02-26 03:57 AM
Re: Problem with kixtart and NT4.0
|
MCA
KiX Supporter
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
We have verify your code with kixstrip tool and we are missing one ENDIF statement. We couldn't verify at the moment KiXscripts Editor accept this code.
code:
;**** Created with KiXscripts Editor | http://KiXscripts.com **** ;**** Last Modified on 2/24/2003 at 11:47:08 AM by mmontgomery **** ; Revised By Matthew T. Montgomery (mmontgomery@sussexcounty.net)
;? 'Error = '+@ERROR+' - '+@SERROR ;Error checking per line
;*************************************************************************************************************************** ;Copy Kix32.exe and My Computer Information.kix Shortcut To The Client PC's Desktop - For Windows 2000 ;***************************************************************************************************************************
;MD c:\Kixscripts ;If NOT Exist('c:\Kixscripts\kix32.exe') ;Copy '\\sussex1\netlogon\Kixtart\kix32.exe' 'c:\Kixscripts' ;EndIf ;If NOT Exist('c:\Kixscripts\My Computer Info.kix') ;Copy '\\sussex1\netlogon\Kixtart\My Computer Information.kix' 'c:\Kixscripts' ;EndIf $desktop = ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop") IF NOT Exist('$desktop\My Computer Information.lnk') COPY '\\sussex1\netlogon\Kixtart\My Computer Information.lnk' '$desktop' ENDIF
;****************************************************************************** ; Check the following key for W2k Machines to make the window not run minimized ;******************************************************************************
IF @dos >= "5.0" $hklms = 'HKEY_LOCAL_MACHINE\SOFTWARE' IF 1 <> ReadValue($hklms+"\Microsoft\Windows NT\CurrentVersion\Winlogon", "RunLogonScriptSync") $ = WriteValue ($hklms+"\Microsoft\Windows NT\CurrentVersion\Winlogon", "RunLogonScriptSync", "1", "REG_DWORD") ENDIF ENDIF
;************************************************************ ;Windows MessageBox To Greet The User And Display Information ;************************************************************
MessageBox(" Hello @FULLNAME - today is @DAY @MDAYNO @MONTH *** You are logging onto the @DOMAIN Domain *** Your current user rights are @Priv Your Password will expire in @PWAGE days. Host Name: @HOSTNAME IP address: @IPADDRESS0 Your System Specifications = @PRODUCTTYPE, @MHZ Mhz @CPU","Sussex Domain Logon",64,5)
; ------------------------------------------------------------------------ ; @MHZ = processor speed ; @CPU = processor type ; @TIME = curent time ; @fullname = shows users full name as entered on Server logon credentials ; @wksta = workstation name as entered on the local PC ; ------------------------------------------------------------------------
;*********************************** ; Synchronize Time From "Sussex-DC1" ;*********************************** SETTIME "\\SUSSEX-DC1"
;***************** ;Clears The Screen ;***************** CLS
;*************************************************** ;Disables The Ability To Interrupt The Script Window ;*************************************************** BREAK OFF
;*********************************** ;Deletes all currently mapped drives ;*********************************** USE "*" /delete
;******************************************* ; Network Drive Mappings by Group Membership ;******************************************* IF InGroup('Domain Users') ? 'I: (\\Sussex-FS-1\General)' USE I: '\\Sussex-FS-1\General' ? 'P: (\\Sussex1\Users\@USERID)' USE P: '\\Sussex1\USERS\@USERID' ? 'S: (\\Sussex1\Shared)' USE S: '\\Sussex1\Shared' ENDIF
IF InGroup('Information Systems') ? 'W: (\\Sussex-FS-2\Information Systems)' USE W: '\\Sussex-FS-2\Information Systems' ENDIF
IF InGroup('Mapping And Addressing') ? 'G: (\\Sussex1\Global)' USE G: '\\Sussex1\Global' ? 'R: (\\Sussex1\ReAddressing)' USE R: '\\Sussex1\ReAddressing' ? 'V: (\\Sussex1\View)' USE V: '\\Sussex1\View' ? 'Z: (\\Sussex-fs-1\Aerial_Photos)' USE Z: '\\Sussex-fs-1\Aerial_Photos' ENDIF
;************************************ ;Printer Mappings by Group Membership ;************************************ IF InGroup('Information Systems') $rc=AddPrinterConnection("\\Sussex-DC2\IS HP LaserJet 4100tn") IF $rc=0 ? "Adding printer, IS HP LaserJet 4100tn" $rc=AddPrinterConnection("\\Sussex-DC2\IS HP Color LaserJet 4550") IF $rc=0 ? "Adding printer, IS HP Color LaserJet 4500" ELSE ? "$$RC = "+$rc ? "@@Error = "+@error ? "@@SError = "+@serror ENDIF ENDIF
;********************************************************************************************** ; Checks for Exchange Server Profile, If Not, Creates One (Tested On Windows 2000 Professional) ;********************************************************************************************** $index = 0 $keyfound = 0
$search_location="HKEY_CURRENT_USER\Software\Microsoft\Windows Messaging Subsystem\Profiles" IF (KeyExist($search_location) = 1) ; 1 if found $keyname = EnumKey("HKEY_CURRENT_USER\Software\Microsoft\Windows Messaging Subsystem\Profiles", $index) WHILE @error = 0 $keyfound = $keyfound + 1 $index = $index + 1 $keyname = EnumKey("HKEY_CURRENT_USER\Software\Microsoft\Windows Messaging Subsystem\Profiles", $index) LOOP ELSE $search_location="HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles" IF (KeyExist($search_location) = 1) ; 3 if found $keyname = EnumKey("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles", $index) WHILE @error = 0 $keyfound = $keyfound + 1 $index = $index + 1 $keyname = EnumKey("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles", $index) LOOP ENDIF ; 3 if end ENDIF ;1 if end
IF $keyfound = 0 $createprofile = @lserver + "\NETLOGON\Profgen.exe " + @lserver + "\NETLOGON\Newprof.exe -P " + @lserver + "\NETLOGON\Custom.prf -X -R -L" RUN $createprofile ? "Email profile created" ; profgen.exe, newprof.exe and custom.prf can be found at http://www.microsoft.com/downloads/search.asp? in a file called idk99.exe ; or email noelh@clara.net for the files. ENDIF
;******************************************************** ;Script Window Stays Focused For Specified Amount Of Time ;******************************************************** SLEEP 2 ; Wait for 5 sec
;*********************** ;Exits The Script Window ;*********************** EXIT
;($begin) ; ; wed 26-feb-2003 03:42:36 (kix 4.20 vs 4.00e) ; ;Informative KIXSTRIP: input=158 output=158 skip=0 ; ;Warning KIXSTRIP: 1 error in block structure. missing statement(s). ; - do:until [0:0] ; - for|each:in|to:step|next [0|0:0|0:0|0] ; - function:endfunction [0:0] ; -ERROR- - if:else:endif [12:2:11] ; - select:case:endselect [0:0:0] ; - while:loop [2:2] ;Warning KIXSTRIP: some lines contains errors or possible errors. ;Informative KIXSTRIP: 14 block_structures found. ;Informative KIXSTRIP: no UDF's found. ;Informative KIXSTRIP: no labels found. ;Summary KIXSTRIP: BREAK CALL DEBUG DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE ;Informative KIXSTRIP: 1 BREAK ;Informative KIXSTRIP: 1 EXIT ;Informative KIXSTRIP: 1 RUN ;Informative KIXSTRIP: 1 SLEEP ;Informative KIXSTRIP: 9 USE ; ;($end) ;($begin) ; ; ;($end)
we think that
code:
IF $rc=0 ? "Adding printer, IS HP LaserJet 4100tn" $rc=AddPrinterConnection("\\Sussex-DC2\IS HP Color LaserJet 4550") IF $rc=0 ? "Adding printer, IS HP Color LaserJet 4500" ELSE ? "$$RC = "+$rc ? "@@Error = "+@error ? "@@SError = "+@serror ENDIF
should be
code:
IF $rc=0 ? "Adding printer, IS HP LaserJet 4100tn" ENDIF $rc=AddPrinterConnection("\\Sussex-DC2\IS HP Color LaserJet 4550") IF $rc=0 ? "Adding printer, IS HP Color LaserJet 4500" ELSE ? "$$RC = "+$rc ? "@@Error = "+@error ? "@@SError = "+@serror ENDIF
greetings.
|
Top
|
|
|
|
#73486 - 2003-03-03 10:08 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
code:
BREAK 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://your LDAP details") $loginscript="yourlogon.bat" for each $user in $target if $user.loginscript <> "$loginscript" ? "Current Script for " +$user.name " is: " +$user.loginscript+ " Should be: " +$loginscript ; $user.loginscript=$loginscript ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat. ; $user.SetInfo ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat. endif next
This code I am not sure how to use. Is there anyway I could give you information to fill in, the structure is what I am concerned with. To get it right.
|
Top
|
|
|
|
#73489 - 2003-03-04 02:35 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
The problem with the script is that I am not sure how to figure out the LDAP part. I looked in AD and don't see anything.
The other thing is...is there an easy way to automatically deploy the dcom if the client doesn't already have it?
|
Top
|
|
|
|
#73491 - 2003-03-04 03:48 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
I am trying too many things at once. Is the problem. I have passed my deadline on making this work and I am in trouble so to speak.
Essentially what I need to have happen is this. I need to deploy a logon script by Active Directory Group Policy. I need it to work on 98, NT 4 WS, 2000 Pro and XP Pro clients. That's it. Right now I am only trying to make it work on NT4 WS and it isn't working.
I know it is possible because I have heard of people doing it. I have been searching the forums for many different posts and don't really get what I am looking for. A lot of reading and not much resource. Such as Do this, this, and this. The reply is I did this, this, and this. Nobody is saying whether it worked or not just more code to try. That is where my frustration is coming from. I am extremely greatful for the help I have received so far. Basically I have the kixtart.kix logon script working fine it is just the deployment part now. I do know if I put it assigned to the user's account in AD it works fine. But there are too many users for me to do that with. So that is why I need to deploy it by OU in AD either by the script or a batch file. Can anyone help me with knowing all of this? [ 04. March 2003, 16:01: Message edited by: DJ Ballistic ]
|
Top
|
|
|
|
#73493 - 2003-03-04 04:16 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Well right now here is what I have
code:
Break 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=Users,ou=Test,dc=sussexcounty,dc=net") $loginscript="logon.bat" For Each $user in $target If $user.loginscript <> "$loginscript" ? "Current Script for " +$user.name " is: " +$user.loginscript+ " Should be: " +$loginscript ; $user.loginscript=$loginscript ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat. ; $user.SetInfo ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat. EndIf Next
I don't know if I changed it to be correct or not. The user is located in the Test OU and the domain is sussexcounty.net
|
Top
|
|
|
|
#73494 - 2003-03-04 04:17 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
See I don't want to apply this to the entire domain as of yet because I need to work out all the bugs with the different OS's.
So I am logging in with a test user that is in that Test OU and is a member of the necessary groups I am testing for. I just have to login with this test user on each of these different OS's to make sure it works on every one before changing it to work on the entire domain heirarchy.
And I am still confused as to where that code should go. In my kixtart.kix script? And is there anything special my logon.bat should contain? [ 04. March 2003, 16:18: Message edited by: DJ Ballistic ]
|
Top
|
|
|
|
#73495 - 2003-03-04 04:18 PM
Re: Problem with kixtart and NT4.0
|
Ryan
Fresh Scripter
Registered: 2001-11-11
Posts: 42
Loc: the Netherlands
|
Just be sure the first script is started. Insert a net send to your computer, like "Net Send %ComputerName% This is a Test !", (this is only for the test). If logon.bat starts kix will also start. But not in your Logon.bat.
You've typed \\sussex1\\NETLOGON, but it should be \\sussex1\NETLOGON. Just be shure that's correct. Otherwise the Kix32 won't be copied and also the script won't be found.
Hope this might help you out!
|
Top
|
|
|
|
#73496 - 2003-03-04 04:21 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
See what is happening with the NT 4 is that it acts like it isn't even running the script. It just logs in without any errors or prompts relating to my script. So how can I make sure it is running? I assume in AD it isn't setup right.
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 252 anonymous users online.
|
|
|