Page 1 of 9 12345>Last »
Topic Options
#73457 - 2003-02-25 04:22 PM Problem with kixtart and NT4.0
DJ Ballistic Offline
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
#73458 - 2003-02-25 04:24 PM Re: Problem with kixtart and NT4.0
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
DJ,

Why don't you show us your logon.bat & your kix script?
_________________________
Jack

Top
#73459 - 2003-02-25 04:28 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
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 Offline
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
#73461 - 2003-02-25 04:44 PM Re: Problem with kixtart and NT4.0
Collin Offline
Fresh Scripter

Registered: 2002-01-18
Posts: 21
Loc: Amsterdam - NL
Hi there,

Group policies cannot be applied to NT4 clients unfortunately [Smile] You'll have to work with good ol' poledit [Wink]

Only 2k and newer clients work with 2000/2003 GPO's
_________________________
Ruud is my hero
Top
#73462 - 2003-02-25 04:46 PM Re: Problem with kixtart and NT4.0
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Oh yeah ... and you commented at least one line false :

quote:
Sleep 2 ; Wait for 5 sec
_________________________



Top
#73463 - 2003-02-25 04:58 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
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
#73464 - 2003-02-25 05:27 PM Re: Problem with kixtart and NT4.0
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Forget about NT4 policies... forget about GPO logon scripts for legacy clients...

It just will not work.

FDISK the clients or specify the logon script in User Manager.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#73465 - 2003-02-25 06:05 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Plain old batch file call in the User Manager. Never fails [Wink]
_________________________
There are two types of vessels, submarines and targets.

Top
#73466 - 2003-02-25 08:36 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
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
#73467 - 2003-02-25 08:39 PM Re: Problem with kixtart and NT4.0
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yeah.

especially when you can do that on by one click on dc.
_________________________
!

download KiXnet

Top
#73468 - 2003-02-25 08:42 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
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
#73469 - 2003-02-25 08:43 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Assuming you have a domain controller, you assign the login script in the 'User Manager for Domains' or whatever that thingy is called on the domain controller.

So, why do you need to go to every workstation to implement a logon script?
_________________________
There are two types of vessels, submarines and targets.

Top
#73470 - 2003-02-25 08:44 PM Re: Problem with kixtart and NT4.0
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You do not have to go to every computer. You can do it from "Active Directory Users and Computers".

There have also been scripts posted that will do it for you.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#73471 - 2003-02-25 08:46 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
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
#73472 - 2003-02-25 08:46 PM Re: Problem with kixtart and NT4.0
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
eh?
AD that hard that you need to script such a task?

bad...
_________________________
!

download KiXnet

Top
#73473 - 2003-02-25 08:47 PM Re: Problem with kixtart and NT4.0
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Ask NTDOC, he was the guy that wanted to script it.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#73474 - 2003-02-25 08:48 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
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 Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
Well where is NTDOC? Is he watching this post?
Top
#73476 - 2003-02-25 08:50 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Yes: Back to square one and assign the logon.bat to each user in your AD domain. Is that too much?
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 9 12345>Last »


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 464 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.074 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org