Page 1 of 2 12>
Topic Options
#19693 - 2002-04-11 12:10 AM just started
2hotty Offline
Getting the hang of it

Registered: 2002-04-09
Posts: 76
Loc: London
I recently just started investigating logon scripts. I created a simply logon script that would map a test users' profile to a printer when they logged onto the network. My primary domain server is running NT4 and i placed the script file in the location - Winnt\System32\Repl\Import\Scripts and in the user's profile i typed in the name of the script where it says ' Script name'. I cant understand why it doesn't work. Here is a copy of the script i designed. Cane anyone help me please as i am new to the game.

cls
color g/n
"Hello, " + @USERID
?

;=== Setting Variable ===

$NTLocalServer=""
$Printer1=""
$Printer2=""
$Printer3=""
$Printer4=""
$Printer5=""
$DefaultPrinter=""

;=== Set Variable ===
SELECT
case InGroup ("smithb")
$NTLocalServer = "\\ESSBASE_1"
$Printer1 = "\\HRTC\claser1"
$Printer2 = "\\HRTC\claser2"
$DefaultPrinter = "\\HRTC\claser1"
_________________________
Any problem encountered is a challenge to overcome.

Top
#19694 - 2002-04-11 12:30 AM Re: just started
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
this script you have here does not seem to do almost anything but...

let's cut from the beginning.
does the script start at all?
if not, try connecting to servers netlogon share.
\\server_name\netlogon

if you see there the script, try running it by hand.
does it work that way?
then, if you put to user manager the script name you must include also kix32 in it.
and this is not allowed on win9x-clients.

here is something to bite.
tell us something more of your trials and we are doing what we can to help you out.

cheers,
_________________________
!

download KiXnet

Top
#19695 - 2002-04-10 01:16 PM Re: just started
2hotty Offline
Getting the hang of it

Registered: 2002-04-09
Posts: 76
Loc: London
till doesn't work. Do i have to have the kix files located somewhere on the user's machine and what format should i save the script file as
_________________________
Any problem encountered is a challenge to overcome.

Top
#19696 - 2002-04-10 01:31 PM Re: just started
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
the format should be plain text. neither does the place where kix-files are located.
you will need to find a way to run it by hand.
if you can't run it manually it will not work as logon script either.
if the script file is found from \\logonserver\netlogon-share you might also put the kix32.exe there
then try it manually as run statement:
\\logonserver\netlogon\kix32 yourscript.kix

if it will not work this way neither does your server nor wksta nor anything.

simple as that.

if it works this way, add line to the users logonscript field:
kix32 yourscript.kix

and it works the same way.

add a line to the end of your script:
? "finished" get $nul

this stops the script until a key is pressed and you wont miss the execution.

ok?
_________________________
!

download KiXnet

Top
#19697 - 2002-04-10 02:16 PM Re: just started
2hotty Offline
Getting the hang of it

Registered: 2002-04-09
Posts: 76
Loc: London
still stuck can anyone help please
_________________________
Any problem encountered is a challenge to overcome.

Top
#19698 - 2002-04-10 02:20 PM Re: just started
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
scott, it would help us help if you would say where you're stuck.
how else we can now are you stuck in traffic yam or is your problem computer related.
_________________________
!

download KiXnet

Top
#19699 - 2002-04-10 02:38 PM Re: just started
2hotty Offline
Getting the hang of it

Registered: 2002-04-09
Posts: 76
Loc: London
When i try and logon using the user profile on a windows 2000 machine nothing happens. I have typed in the location for the script file as kix32 test.scr(name of the script). The primary server is NT4. The server where the printer are located is win 2000. Kix32 is located in the right directory on the primary server. Nothing i don't understand why. You guys seem to know this stuff really well, what am i doing wrong. The help is really appreciated.
_________________________
Any problem encountered is a challenge to overcome.

Top
#19700 - 2002-04-10 03:14 PM Re: just started
2hotty Offline
Getting the hang of it

Registered: 2002-04-09
Posts: 76
Loc: London
Can someone please help i am really confused
_________________________
Any problem encountered is a challenge to overcome.

Top
#19701 - 2002-04-10 03:33 PM Re: just started
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Okay, let's go back to square one [Razz]

First of all, please do this step-by-step, double-checking everything to make sure it works. There is no point in going to step 2) if step 1) doesn't work.

Step 0:
Download Kixtart 4.02

Step 1:
If you only have a PDC then you will put your script into %SYSTEMDRIVE%\Winnt\System32\Repl\Import\Scripts which is normally mapped as \\PDC\NETLOGON (replace PDC with the name of your PDC)

If you have a PDC and one or more BDC then you will have to put your scripts into %SYSTEMDRIVE%\Winnt\System32\Repl\Export\Scripts and enable replication on the PDC. This will copy the scripts automatically to the 'import' directories of the PDC and all BDCs as soon as the file is changing in %SYSTEMDRIVE%\Winnt\System32\Repl\Export\Scripts.

If you have Windows 9x computers that are logging into the domain, install the Kixtart RPC server on all domain controllers as per manual or use the XNET example script in the Kixtart download to install the RPC server.

DO NOT USE KIXTART 4.10b1 BECAUSE IT IS BETA AND NOT TO BE USED IN A PRODUCTION ENVIRONMENT!!!

Check out http://81.17.37.55/board/ultimatebb.php?ubb=get_topic;f=10;t=000024

Step 2:
Create a simple login batch file like LOGIN.BAT:
code:
ECHO Running login script

PAUSE

Put it into the appropriate directory based on step 1) and check it is getting replicated.
Assing the script LOGIN.BAT as the login script to a test user in the 'User Manager for Domains'

Step 3:
Log in with the test user from a workstation and make sure that the login script runs.

Step 4:
Modify the login script LOGIN.BAT to
code:
ECHO Running Kixtart login script

%0\..\KIX32.EXE %0\..\LOGIN.KIX

PAUSE

Copy KIX32.EXE, KX*.DLL into the appropriate directory based on step 1) and check it is getting replicated.
Create a text file called LOGIN.KIX containing the lines
code:
? 'Kixtart Login Script'
? 'Username : ' + @USERID
? 'Computer : ' + @WKSTA

Step 5:
Log in with the test user from a workstation and make sure that the login script runs.

Step 6:
Success, have a beer, report back to the BBs that it's working

Step 7:
Get fancy, modify the script for drive and printer mappings

Step 8:
Browse the BBS for more advanced login script features

Step 9:
Get Kixtart to brew a cup of coffee for you [Wink]

[ 10 April 2002, 18:31: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#19702 - 2002-04-10 04:04 PM Re: just started
2hotty Offline
Getting the hang of it

Registered: 2002-04-09
Posts: 76
Loc: London
you have been the most help, but i only got to step 3. I placed the script and bat file on the pdc in the right folder but it did not replicate and therefore the script did not run when i logged on. I think my server automtaically replicates but how can i make sure?
_________________________
Any problem encountered is a challenge to overcome.

Top
#19703 - 2002-04-10 04:09 PM Re: just started
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
It can take about 15 minutes to replicate in most cases. Make sure the replicator is enabled under services. If it is, check the event log for errors. If everything seems to be working properly, then check \\lserver\netlogon to see if the files are available. If still no luck, try stopping and restarting replicator services on your DCs.

Brian

Top
#19704 - 2002-04-10 05:02 PM Re: just started
2hotty Offline
Getting the hang of it

Registered: 2002-04-09
Posts: 76
Loc: London
thanks guys i am actually getting somewhere. After creating the text file - login.kix, i place it in the pdc and it was replicated, but when i logon i get - login.kix is not recognised as an internal or external command, operable program or bacth file.
_________________________
Any problem encountered is a challenge to overcome.

Top
#19705 - 2002-04-10 05:27 PM Re: just started
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Did you do step 4) ?
Did the LOGIN.BAT run and display the appropriate text?
_________________________
There are two types of vessels, submarines and targets.

Top
#19706 - 2002-04-10 05:37 PM Re: just started
2hotty Offline
Getting the hang of it

Registered: 2002-04-09
Posts: 76
Loc: London
yeh, but it said that it couldn't recognise login.kix
_________________________
Any problem encountered is a challenge to overcome.

Top
#19707 - 2002-04-10 06:09 PM Re: just started
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Okay, so LOGIN.BAT, LOGIN.KIX, and KIX32.EXE are all in the same directory \\PDC\NETLOGON ?

What happens if you double-click on LOGIN.BAT in \\PDC\NETLOGON from a workstation in order to execute the login script manually? It should run.

BTW, LOGIN.KIX is just a text file not an executable that's why you can't run it by itself. It must be run through KIX32.EXE.
_________________________
There are two types of vessels, submarines and targets.

Top
#19708 - 2002-04-10 06:18 PM Re: just started
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Jens, there was a syntax error in your Logon.bat snipet. The correct change to logon.bat should read:

code:
ECHO Running Kixtart login script
%0\..\KIX32.EXE %0\..\LOGIN.KIX
PAUSE



[ 10 April 2002, 18:20: Message edited by: Chris S. ]

Top
#19709 - 2002-04-10 06:32 PM Re: just started
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Thanks, corrected.
_________________________
There are two types of vessels, submarines and targets.

Top
#19710 - 2002-04-10 07:15 PM Re: just started
bowhuntr Offline
Fresh Scripter

Registered: 2002-02-18
Posts: 33
I know this seems basic, but did you go back before starting Sealeopard's plan and change the profile logon script name to login.bat for the test user?
Top
#19711 - 2002-04-11 10:02 AM Re: just started
2hotty Offline
Getting the hang of it

Registered: 2002-04-09
Posts: 76
Loc: London
I changed the login.bat to

ECHO Running Kixtart login script
%0\..\KIX32.EXE %0\..\LOGIN.KIX
PAUSE

Then i manually started it but now it is saying - ' script error. Failed trying to find/open scipt.

Any ideas guys?
_________________________
Any problem encountered is a challenge to overcome.

Top
#19712 - 2002-04-11 10:31 AM Re: just started
2hotty Offline
Getting the hang of it

Registered: 2002-04-09
Posts: 76
Loc: London
sorry guys, it does work. u are all brill and i am very grateful for all your help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
_________________________
Any problem encountered is a challenge to overcome.

Top
Page 1 of 2 12>


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

Who's Online
2 registered (morganw, mole) and 414 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

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

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