#73457 - 2003-02-25 04:22 PM
Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
I am trying to deploy my logon.bat that calls my kixtart.kix script through a group policy.
The servers are windows 2000 server and the client is windows NT 4.0 Workstation.
I have tried putting several things in the logon key in the group policy screen and nothing works when the user logs on. I don't get any errors or anything but it doesn't run the script either.
Please help!
|
Top
|
|
|
|
#73459 - 2003-02-25 04:28 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Logon.bat
code:
ECHO OFF CLS REM detect the operating system and go to the appropriate segment VER | find "NT" > nul IF not errorlevel 1 GOTO Win_NT VER | find "2000" > nul IF not errorlevel 1 GOTO Win_2K VER | find "XP" > nul IF not errorlevel 1 GOTO Win_XP VER | find "98" > nul IF not errorlevel 1 GOTO Win_98 VER | find "95" > nul IF not errorlevel 1 GOTO Win_95 VER | find "Millennium" > nul IF not errorlevel 1 GOTO WIN_ME GOTO DOS REM client is running DOS :DOS ECHO. ECHO No Login Script Available For DOS Clients ECHO. GOTO End REM client is running Windows 9x :Win_95 :Win_98 :Win_ME %WINDIR%\COMMAND\XCOPY %0\..\KIX32.EXE %WINDIR%\ /D /H /I /R /V /C >NUL %WINDIR%\COMMAND\XCOPY %0\..\KX*.DLL %WINDIR%\ /D /H /I /R /V /C >NUL GOTO RunScript REM client is running Windows NT/2000/XP :Win_NT :Win_2K :Win_XP ECHO y| XCOPY \\sussex1\\NETLOGON\KIX32.EXE %WINDIR%\ /D /H /I /R /V /C >NUL >NUL >NUL
GOTO RunScript :RunScript %WINDIR%\KIX32.EXE \\sussex1\\NETLOGON\Kixtart.KIX
GOTO End :End
CLS EXIT 0
Kixtart.kix
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
|
Top
|
|
|
|
#73460 - 2003-02-25 04:30 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
If I deploy the logon.bat or the kixtart.kix script to the user individually it works perfectly without any problems.
In the Group Policy Logon key I tried adding it there and it just doesn't work.
|
Top
|
|
|
|
#73463 - 2003-02-25 04:58 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Well you can't do that if the servers are 2K can you? I don't have a NT 4 Domain Controller to handle NT 4 policies. I do know you can deploy policies to an NT4 box within a 2000 domain.
And the comment is a non-issue. But Thanks!
|
Top
|
|
|
|
#73466 - 2003-02-25 08:36 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
yeah but I gotta go to each nt 4 workstation and set that right?
Damn that is a lot of work.
|
Top
|
|
|
|
#73468 - 2003-02-25 08:42 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Huh!?!?!?!
The second part of your post was kinda confusing.
Could you please elaborate?
|
Top
|
|
|
|
#73471 - 2003-02-25 08:46 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
In our organization we have many departments that use different mapped drives and printers based on their departments. My logon script checks for the ingroup and does it accordingly. We have a mixture of 9x, NT4, 2000 Pro and XP Pro clients. All 2000 Server Domain Controllers running AD.
|
Top
|
|
|
|
#73474 - 2003-02-25 08:48 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
AD isn't hard, what are you getting at? You got a better idea?
|
Top
|
|
|
|
#73475 - 2003-02-25 08:50 PM
Re: Problem with kixtart and NT4.0
|
DJ Ballistic
Starting to like KiXtart
Registered: 2003-02-21
Posts: 185
|
Well where is NTDOC? Is he watching this post?
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 539 anonymous users online.
|
|
|