Page 1 of 1 1
Topic Options
#73748 - 2003-02-27 08:01 PM Logon script fromscratch
anwar Offline
Fresh Scripter

Registered: 2003-02-25
Posts: 17
Loc: texas
Okay I took the SeaLeopard advise and start small

Here is a simple Kixtart script and the batch file to run code.

Kixtart Script:
code:
SETCONSOLE("HIDE")
;DRIVE P: IS LISTED IN EACH GRUOP
MAPDRIVE ("P:",JOSMITH1,"JO SMITH & ASSOCIATES\PUBLIC")

and here is the batch file that runs it

Batch file:
code:
@echo off
CLS

If EXIST %WINDIR%\SYSTEM32\KIX32.EXE GOTO RUNSCRIPTS
XCOPY \\JOSMITH1\KIXTART\KIX32.EXE %WINDIR%\SYSTEM32\ /D/H/I/R/V > NUL


GOTO RUNSCRIPTS

:RUNSCRIPTS

ECHO LOADING LOGON SCRIPTS, PLEASE WAIT........
%WINDIR%\SYSTEM32\KIX32.EXE \\JOSMITH1\KIXTART\TESTLOGON.KIX

I ran a debug on my kixtart script and received an error msg. "Error: Failed to find/open script!"
I put the script in the Netlogon file on our server. I have set the permission on the folder to EVERYONE, everyone is in the same domain group "JOSMITHINSURANCE.COM" and everyone is setup to be an administrator on their machine. So what have I done wrong? [Confused]

Top
#73749 - 2003-02-27 08:06 PM Re: Logon script fromscratch
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
A couple things:

1) I would remove the line to hide the console, because in testing you want to see what is going on.

2) I would remove the IF exeist for Kix32 because you are using xcopy /d which will update Kix32 only when a newer source file exists.

3) %WINDIR%\SYSTEM32\KIX32.EXE \\JOSMITH1\KIXTART\TESTLOGON.KIX Are you not missing the share name in the path for the script?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#73750 - 2003-02-27 08:07 PM Re: Logon script fromscratch
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
If you put the script into the NETLOGON folder, then why do you try to load it from the KIXTART folder?

Also, when starting from scratch, keep it a simple as possible. Thus, the login.bat bathc file should just be
code:
\\JOSMITH1\NETLOGON\KIX32.EXE \\JOSMITH1\NETLOGON\LOGIN.KIX

and the KiXtart script should be
code:
? 'Login script running KiXtart v'+@KIX
? 'Press any key'
get $a

Now, get this working. One this works you can expand your script. Also, MAPDRIVE is a UDF, thus you'll have to include the UDFs. Test this from a command prompt first, then give one test user the batch file for testing purposes.

It can't be that hard, can it?

Don't even start copying files to the client.

Oh, and are all your users so well versed in computer issues that you can trust them with full local administrative rights?

[ 27. February 2003, 20:08: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#73751 - 2003-02-27 08:09 PM Re: Logon script fromscratch
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Also you posted use on my MapDrive function but do not show the UDF code in your test script. For the script to work you will need to include the function source in your script.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#73752 - 2003-02-27 08:40 PM Re: Logon script fromscratch
anwar Offline
Fresh Scripter

Registered: 2003-02-25
Posts: 17
Loc: texas
If I take out the IF EXIST statement won't a computer with KIX32 try to copy it again? I am not sure if the /d a swith that will only allow the KIX32 to be copy to computer that don't have it or needs a newer version or a typo. Okay the MapDrive UDF I am have some trouble with it is there another command I can use that will map this drive to everyone?
Top
#73753 - 2003-02-27 08:43 PM Re: Logon script fromscratch
Lonkero Administrator Offline
KiX Master Guru
*****

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

check kixtart manual for "USE":

USE P: \\server\share
_________________________
!

download KiXnet

Top
#73754 - 2003-02-27 08:48 PM Re: Logon script fromscratch
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Oh man, do I need to spell it out?

You DO NOT want to copy the files to the clients AT ALL!

Get your one-line batch file working first.

Then get the demo script working that I posted.

Once you've accomplished this, you should start reading the KiXtart Manual and the FAQ Forum.

For mapping drives, you might want to look at the KiXtart Manual udner USE. The manual even comes with examples to all functions.

Also, there have been login.bat files posted that work for all Windows clients. The thread is titled 'login.bat (The overkill version)'.
_________________________
There are two types of vessels, submarines and targets.

Top
#73755 - 2003-02-27 08:53 PM Re: Logon script fromscratch
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I suggest that you execute "xcopy /?" at a DOS prompt to understand what the xcopy switches you have elected to use do for you.

quote:
/D:m-d-y Copies files changed on or after the specified date.
If no date is given, copies only those files whose
source time is newer than the destination time.

the script I sent to you the other day work fine. It appears that you introduces a syntax error that caused the UDFs not to be parsed correctly.

After you get this simple script to work, go back and fix the one I sent and try it. You show be doing all this testing by simply executing Kix32 and passing it a script name inside a DOS window. Once that works then you can try executing it as a logon script.

[ 27. February 2003, 20:54: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
Page 1 of 1 1


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

Who's Online
0 registered and 1821 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.069 seconds in which 0.037 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