Page 3 of 3 <123
Topic Options
#31090 - 2002-10-31 10:57 AM Re: I got error when I run kix script at first time.
Pech Offline
Getting the hang of it

Registered: 2002-10-16
Posts: 61
Loc: Thailand
I just put kix32.exe PLogonNT.kix in User Profile
But When I start to logon.. No any action..

How I can handle this error!

Pech

Top
#31091 - 2002-10-31 01:19 PM Re: I got error when I run kix script at first time.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
is it possible for you to put the files on all dc's in the netlogon?
the no action is just normally the result of not finding the program which in this case is kix32
_________________________
!

download KiXnet

Top
#31092 - 2002-10-31 04:18 PM Re: I got error when I run kix script at first time.
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Pech:

Please do us a favor and go back to square one!

a) Remove all yoru scripts/files for the domain controller's NETLOGON share.

b) Put a login.bat into the NETLOGON share, e.g. the one in Kixtart Starter's Guide with the call to KiXtart commented out.

c) Have your users call the login.bat

d) Make sure it works.

e) Removed the comment to enable call to KiXtart

f) Use simple KiXtart script to verify that login script runs by e..g displaying a messagebox.

g) Add parts to login script and test.

Also, please be more precise in your answers.
_________________________
There are two types of vessels, submarines and targets.

Top
#31093 - 2002-11-01 03:29 AM Re: I got error when I run kix script at first time.
Pech Offline
Getting the hang of it

Registered: 2002-10-16
Posts: 61
Loc: Thailand
I have only one DC.
I put PLogon.bat in \\...\netlogon and login it works

If I specify in PLogon.bat
kix32.exe Plogon.kix (not specifiy path)
system command error, coz cannot find kix32.exe and Plogon.kix

If I put Kix32 PLogon.Kix in User Profile..Does not do anything.

Pech

Top
#31094 - 2002-11-01 04:56 AM Re: I got error when I run kix script at first time.
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Pech,

I see you are having some trouble with deployment/running your scripts..

I would recommend the following as it was interesting exercise for us in how to do an upgrade to KiXtart 4.x..

Starting with your NTLOGON.BAT file, please read:

Q318689 and yes this is a Microsoft article, but is worth the read.

However, if we look at Deployment of Kix Scripts and then look at Page 2.. We see that we can distill or get what we need out of the script.

Once you get your NTLOGON.BAT which is what is commonly named, you can then start working on the KiXtart piece.

Oh, you called yours PLOGON.BAT.

HTH,

Kent

[ 01. November 2002, 04:57: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#31095 - 2002-11-01 09:26 AM Re: I got error when I run kix script at first time.
Pech Offline
Getting the hang of it

Registered: 2002-10-16
Posts: 61
Loc: Thailand
I have still an error code : 1208
when I use command to map drive
use H: "\\...\sharename"

How I can handle this error it?

Top
#31096 - 2002-11-01 02:06 PM Re: I got error when I run kix script at first time.
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Pech,

If we look at the manual for the syntax of how to map a share..

quote:

USE H: "\\SERVER\PUBLIC"

Or, it could be somewhat similar to:

quote:

USE H: "\\SERVER\" + @USERID + "$"

{Edit} - We find what you are looking for:
code:
USE H: "\\bstl_svr3\" + @USERID + "$"

HTH,

Kent

[ 01. November 2002, 14:11: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#31097 - 2002-11-01 02:08 PM Re: I got error when I run kix script at first time.
Waltz Offline
Seasoned Scripter

Registered: 2002-08-01
Posts: 485
Loc: Waterloo, Ontario, Canada
quote:
One possible cause of this error is that License Manager has not been set up to grant enough connections to meet the clients' demands.

_________________________
We all live in a Yellow Subroutine...

Top
#31098 - 2002-11-01 02:10 PM Re: I got error when I run kix script at first time.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so question is, do you have license manager running?
_________________________
!

download KiXnet

Top
#31099 - 2002-11-04 04:57 AM Re: I got error when I run kix script at first time.
Pech Offline
Getting the hang of it

Registered: 2002-10-16
Posts: 61
Loc: Thailand
In Windows NT, 2000 and XP

I have to use command for map drive like this

USE H: "\\server\%username%"

-----------
My Server has licensing manager to control license. And Licensing Log Service is started. If you think like this, may be wrong.

Because First logon.. Failed (Error 1208)
Wait and Run script by manual.. It works!

Pech

Top
#31100 - 2002-11-04 07:04 AM Re: I got error when I run kix script at first time.
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Pech,

Most Administrators would map drives this way..
code:
USE H: "\\server\" + @USERID + "$"

But you may not be using hidden shares, so it would be:
code:
USE H: "\\server\" + @USERID

The point being, why aren't you using the KiXtart Macros like @USERID?

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#31101 - 2002-11-04 08:03 AM Re: I got error when I run kix script at first time.
Pech Offline
Getting the hang of it

Registered: 2002-10-16
Posts: 61
Loc: Thailand
What is a different between?

For Windows 9x
USE H: \\server\@userid

Fow Windows NT, 2000, XP
USE H: \\server\%username%

Right?

Pech

Top
#31102 - 2002-11-04 02:13 PM Re: I got error when I run kix script at first time.
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
One thing, you are missing quotes. [Smile]

It is -
code:
USE H: "\\SERVER\" + @USERID

And again, if you have hidden shares (which would be normal for user information):

code:
USE H: "\\SERVER\" + @USERID + "$"

The other is if you can maintain a consistent standard between 9x and NT-based machines, it will be easier for you.

If you need or must use %username% under 9x, you would than need to do something like -
JSI Tip 1786. Another way to set %UserName%, %ComputerName%, and %LogonServer% for W9x.


HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#31103 - 2002-11-07 04:34 AM Re: I got error when I run kix script at first time.
Pech Offline
Getting the hang of it

Registered: 2002-10-16
Posts: 61
Loc: Thailand
To Kent
I have not any problem with Client Windows 9x.

But In Windows 2000, NT, XP client. I got an error, when I logon at first time : error code :1208

If I wait a few minute and run script by manual, it works. (USE H: "\\server\%username%"), failed only at first login.

Pech

Top
#31104 - 2002-11-07 08:47 AM Re: I got error when I run kix script at first time.
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Pech,

Let's start with some questions:

Starting from the top..
  • On your Domain Controller (DC), is it up-to-date with drivers, etc.? Have you been to windowsupdate, etc.?
  • What Service Pack is the DC?
  • Anything in the Eventlog related to this or KiXtart in general?
  • Is there space available on the DC if it is being used for other purposes like a file store?
  • Is the network DHCP or Static?
  • Can you PING the DC from the Command Line? By IP? By Name?
  • Has this ever worked properly?
  • User Profiles in Active Directory users and computers - do you specify PLOGON.BAT or PLOGON?
  • > One possible cause of this error is that License Manager has not been set up to grant enough connections to meet the clients' demands.
    Did you setup your license Manager by Client or by Server? If you set it by 25 Clients for example and the 26th logs in, sorry!!
  • Do your users have at least Read and Execute permissions on your NETLOGON folder/share?
You are right, there is no real difference in the environment variables and the KiXtart macros.
But, the macros are easy and quick to use. KiX Macros tend to be more accurate too.

However, the Macros are especially handy with Windows 9x.
If you want to use environment variables outside of Windows and in a DOS Session.
You will need to use:
WINSET.EXE
PUTINENV.EXE

The question being, if you can do this stuff in KiXtart, why use extra utilities?

Now, back on task here..

Using the information that you have told us.. The following has been compiled together.

This is using some ideas from -
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q318689
There are some errors with Microsoft's code, but has good ideas.
  • SETLOCAL..ENDLOCAL don't work with 9x
  • CALL is used in Batch Scripting as well as KiX "CALL"s another Batch Script or KiX script.
PLOGON.BAT
code:
@ECHO off :: -- Note: the correction here
IF "%OS%" == "Windows_NT" goto NT_OS
%0\..\kix32.exe %0\..\PLogon9x.kix :: -- Note: the correction
GOTO END
:NT_OS
kix32.exe PLogonNT.kix :: -- Note: the correction and this should work in NT environments
:: %logonserver%\netlogon\kix32.exe %logonserver%\netlogon\PLogonNT.kix ;-- This is the first alternate way to do this
:: %windir%\kix32.exe %logonserver%\netlogon\PLogonNT.kix ;-- This is an alternate way to do this
GOTO END

:END
EXIT

Left out the 9x script as it appears to work ok..

Added in some more detection
PLogonNT.kix
code:
 ? "Map Network drive (User)..."
IF (GETFILEATTR("H:\") & 16) ; - Check for Drive existence first
USE H: /DELETE
If @ERROR <> '0'
?'ERROR DELETING H: DRIVE ' + @ERROR
ENDIF
USE H: "\\bstl_svr3\" + @userid + "$"
If @ERROR <> '0'
?'ERROR MAPPING H: DRIVE ' + @ERROR
ENDIF
ELSE
USE H: "\\bstl_svr3\" + @userid + "$"
If @ERROR <> '0'
?'ERROR MAPPING H: DRIVE ' + @ERROR
ENDIF
ENDIF

IF INGROUP("MK11")
IF (GETFILEATTR("I:\") & 16)
USE I: /DELETE
If @ERROR <> '0'
?'ERROR DELETING I: DRIVE ' + @ERROR
ENDIF
USE I: "\\bstl_svr3\DocMK11$"
If @ERROR <> '0'
?'ERROR MAPPING I: DRIVE ' + @ERROR
ENDIF
ELSE
USE I: "\\bstl_svr3\DocMK11$"
If @ERROR <> '0'
?'ERROR MAPPING I: DRIVE ' + @ERROR
ENDIF
ENDIF
IF (GETFILEATTR("J:\") & 16)
USE J: /DELETE
IF @ERROR <> '0'
?'ERROR DELETING J: DRIVE ' + @ERROR
ENDIF
USE J: "\\bstl_svr3\ShareDoc"
If @ERROR <> '0'
?'ERROR MAPPING J: DRIVE ' + @ERROR
ENDIF
ELSE
USE J: "\\bstl_svr3\ShareDoc"
If @ERROR <> '0'
?'ERROR MAPPING J: DRIVE ' + @ERROR
ENDIF
ENDIF
; -- If the next line is a windows program, RUN will work
SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
ENDIF
; Before continuing, copy the text from the window and paste
; the information in response here
?"PRESS ANY KEY TO LEAVE"
GET $K
EXIT

We could actually combine PLogon9x.kix and PLogonNT.kix into one script:
KiXtart.kix
code:
 ? "Map Network drive (User)..."
IF (GETFILEATTR("H:\") & 16)
USE H: /DELETE
USE H: "\\bstl_svr3\" + @userid + "$"
ELSE
USE H: "\\bstl_svr3\" + @userid + "$"
ENDIF

IF INGROUP("MK11_LOC") OR INGROUP("MK11")
IF (GETFILEATTR("I:\") & 16)
USE I: /DELETE
USE I: "\\bstl_svr3\DocMK11$"
ELSE
USE I: "\\bstl_svr3\DocMK11$"
ENDIF
IF (GETFILEATTR("J:\") & 16)
USE J: /DELETE
USE J: "\\bstl_svr3\ShareDoc"
ELSE
USE J: "\\bstl_svr3\ShareDoc"
ENDIF
; -- If the next line is a windows program, RUN will work
SHELL "\\bstl_svr1\ofcscan\autopcc.exe"
ENDIF
EXIT

So, if we do that change.. PLogon.bat becomes the following:
PLOGON.BAT
code:
@ECHO off :: -- Note: the correction here
IF "%OS%" == "Windows_NT" goto NT_OS
%0\..\kix32.exe %0\..\Kixtart.kix
GOTO END
:NT_OS
kix32.exe Kixtart.kix
GOTO END

:END
EXIT

Time to go to bed..

Kent

[ 07. November 2002, 08:54: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
Page 3 of 3 <123


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

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

Generated in 0.07 seconds in which 0.027 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