#73748 - 2003-02-27 08:01 PM
Logon script fromscratch
|
anwar
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?
|
|
Top
|
|
|
|
#73749 - 2003-02-27 08:06 PM
Re: Logon script fromscratch
|
Howard Bullock
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?
|
|
Top
|
|
|
|
#73750 - 2003-02-27 08:07 PM
Re: Logon script fromscratch
|
Sealeopard
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
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.
|
|
Top
|
|
|
|
#73752 - 2003-02-27 08:40 PM
Re: Logon script fromscratch
|
anwar
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
|
|
|
|
#73755 - 2003-02-27 08:53 PM
Re: Logon script fromscratch
|
Howard Bullock
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 ]
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1821 anonymous users online.
|
|
|