**DONOTDELETE**
(Lurker)
2000-01-06 10:46 AM
Script not running

Below is a sample of the login script that I created on my system.

Rem Logon Script

Echo Welcome %USERNAME% TO WINDOWS
Echo %USERDOMAIN% SERVER

Rem Drive Mapping******
Rem Home Folders

NET USE H:\\SERVERNAME\%USERNAME$%

Rem Group Folders

NET USE G:\\SERVERNAME\%GROUPNAME%

Rem End Script

I name this bile logon.bat and place in the share folder on the Win NT server I am running. I also place the necessary Kixtart files in the same share folder as the logon.bat file.

I then copy the file needed for the win 95/98 client on the client machine restart the client machine and the logon script did not work.

Please note he logon script was written in notepad.

How do I write this script so that it can run on the win 95/98 clients. (desperately needed to be done).

Thanks

wwood


**DONOTDELETE**
(Lurker)
2000-01-06 11:49 AM
Re: Script not running

Hi

Ok it looks as if you need to read the Kixtart manual a bit more! I don't mean to be rude there!

Not sure what groups have access to what shares on your system, that will have to be done "group by group, share by share"

For the users home dir try:

USE "H:\\SERVERNAME\@userid$$"

OR

$drive="\\servername\"+@userid+chr(36)
USE H: $drive

The group mappings need to look something like:

IF INGROUP ("yourgroup")
USE F: "\\servername\share1"
USE G: "\\servername\share2"
USE H: "\\servername\share3"
ENDIF

I hope this points you in the right direction, good luck.

Rgds

------------------
Don Davidson
Network Engineer
http://www.insight-media.co.uk




**DONOTDELETE**
(Lurker)
2000-01-06 01:21 PM
Re: Script not running

I got the mapping to work found out that the way I had save the .bat file was incorrect so I am now able to mapped the drives.

Now I need to know how can I use kixtart to run this .bat that have the commands and also can I place the kixtart commands variables in this .bat file and it would run the .bat file with the kixtart commands and variables.

Thanks

Jack Lothian
(MM club member)
2000-01-06 01:24 PM
Re: Script not running

You seem mixed up between DOS and Kixtart. Logon.bat is a dos (or script) command file which might be used to envoke kixtart. If you are using NT workstation as a client then your script is appropriate and probably will run with minor changes. In this case, kixtart would be unnecessary. As written, this script will not work with Windows 95/98 clients. You need to use these variables within a kixtart script.

**DONOTDELETE**
(Lurker)
2000-01-06 02:11 PM
Re: Script not running

how do I go about getting to write the codes in kiktart? do I need the kixtart editor I am very confuse as I am very young to all this and trying very hard to understand how you write kixtart codes in kixtart and using which editor and how do you get to the kixtart editor or will I have to buy a special kixtart editor.

**DONOTDELETE**
(Lurker)
2000-01-06 05:00 PM
Re: Script not running

Hello again

Jack, I think wwood needs hand holding!

No you do not need a special editor, Kixtart code can be written using notepad (just like a batch file,) INSTEAD you save the file as a .kix or a .scr file extension.

E.G.

login.bat = a dos (or script) batch file

login.kix = a Kixtart script

Are you running NT servers?
Have you set up the KXRPC service on your NT PDC & BDC ?
Have you copied the required Kixtart files over to your Win9x clients as per the Kixtart manual?

How to install Kixtart as a service on your NT servers and the "code" Kixtart uses and what files are required on Win9x systems can be found in the manual/document found in the downloadable file found here:
http://www.kixtart.to/script/bin/kix32-362.zip

Here's more help.

In usermanager on your NT PDC ensure your users login script line is login.bat (only an example!)

Within login.bat you do something like:


rem The following code copies the required kixtart files over to Win9x clients on login

IF "%OS%" = "Windows_NT" GOTO WinNT
REM * If can't detect WinNT, assume system is Win95/98
XCOPY %0\..\KIX32.EXE %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL
XCOPY %0\..\KX16.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL
XCOPY %0\..\KX32.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL
XCOPY %0\..\KX95.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL
ECHO Finished Verifying/Upating Script Installation.
GOTO Runscript

:WinNT
XCOPY %0\..\KIX32.EXE %WINDIR%\SYSTEM32\ /D /H /I /R /V > NUL

ECHO Finished Verifying/Upating Script Installation.
GOTO Runscript

:RunScript
ECHO OFF
CLS
ECHO Mapping NT Directories Please Wait...

%0\..\kix32.exe kixlogin.kix

EXIT


At the bottom of the login.bat you can see a reference to a .kix file. This is the file where you would do your mappings etc. using Kixtart code.

Oh, ensure you have the required Kixtart files in the netlogon directory of your PDC & BDC so they can be copied over to the Win9x clients.

I hope this helps.

Rgds
Don


**DONOTDELETE**
(Lurker)
2000-01-06 06:58 PM
Re: Script not running

Ok, So I guess what you are saying is I have to create two files. The logon.bat file to copy the necessary kixtart files to the win 95/98 client machine and a second kiklogin.kix file which will out line all the mapping and other stuff that I want to be done.

Now, if I set up the KXRPC service on the PDC&BDC the .kix file will be read ok on the client machine.

Will this logon.bat file, that copy the kixtart file, have to be run every time the client logon to his/her machine of and do the coping of these file if not what else do I have to do since the service is already running.

**DONOTDELETE**
(Lurker)
2000-01-07 03:14 AM
Re: Script not running

Wilton

I got your email, thanks, but I decided to answer your questions here.

The RPC service is already running, good.

The batch file runs every time the user logs on, BUT because of the syntax of the xcopy commands once the files are copied over to the clients, they only get copied over again if you over write the originals on the PDC/BDC netlogon dir with updated files (as in an upgraded Kixtart release.)

TIP:
If you set up the NT replication on the PDC netlogon dir to replicate to your BDC's netlogon dir then any updates or files you place in the netlogon dir will get replicated to your BDC's too!

I think your getting there. Try a test user and script first before going "live" so you can iron any bugs out you may have written.

Good luck
Rgds
Don




Jack Lothian
(MM club member)
2000-01-07 10:08 AM
Re: Script not running

The primary purpose of kixtart is to provide your script with variables such "username" "group", etc. On NT workstation these are already defined with in the environmental variables built-in to NT & thus in a pure NT LAN a lot of the reason for using kixtart is lost. On the other hand, these variables are not built-in to Windows 95 - kixtart together with the kxrpc service gives these variables to you so Windows 95 becomes more NT like.

Kixtart secondary role is as DOS or script extender. It gives you a lot of "nice to have" functions that makes writing scripts easier.

Reading your notes, you seem rather new to the whole of issue of logons and scripts. I suggest you do some surfuring & check out some sites on "NT scripting" and "NT logon scripts". See also if you can get a basic text on NT server management. This site is not really appropriate for bootstraping you on general NT management issues. There are other forums that do deal with general NT management issues. Check these out.
http://www.32bit.com/forums/ http://discussions.virtualdr.com/

**DONOTDELETE**
(Lurker)
2000-01-07 11:49 AM
Re: Script not running

Jack

Who was that post meant for?

Wwood I assume or both of us!

Rgds
Don


**DONOTDELETE**
(Lurker)
2000-01-07 11:54 AM
Re: Script not running

I am up and running now, with my logon script. I want to thank you all for you invaluable help



**DONOTDELETE**
(Lurker)
2000-01-08 12:33 AM
Re: Script not running

Wilton

Glad to hear the great news!

Rgds
Don


**DONOTDELETE**
(Lurker)
2000-01-08 03:02 PM
Re: Script not running

I am back again.

I would like to know how to assign the group names in the @comment macro.



**DONOTDELETE**
(Lurker)
2000-01-10 04:47 AM
Re: Script not running

Wwood

@comment takes the comment field from the description field in user manager (I think!) someone correct me if I am wrong!! Never used it.

Thanks
Rgds
Don


**DONOTDELETE**
(Lurker)
2000-01-10 04:47 AM
Re: Script not running

Wwood

@comment takes the comment field from the description field in user manager (I think!) someone correct me if I am wrong!! Never used it.

Thanks
Rgds
Don


**DONOTDELETE**
(Lurker)
2000-01-10 05:23 AM
Re: Script not running

Wilton

@COMMENT uses the description field in the user manager (I think!) someone correct me if I am wrong.

Rgds
Don


**DONOTDELETE**
(Lurker)
2000-01-10 05:26 AM
Re: Script not running

All

Apologies for the duplicate posting!!

I was getting IE5 errors when submitting the form. Something about cgi I think.

Don


**DONOTDELETE**
(Lurker)
2000-01-10 10:52 AM
Re: Script not running

I found that out over the weekend. But it still does not work I am also trying to use INGROUP function and that is not working either. Mapping to my home folders works perfect but mapping to the group folders is not working what should I do to get it working.

**DONOTDELETE**
(Lurker)
2000-01-10 11:18 AM
Re: Script not running

Hi

Post a sample of what you are trying to do.

Thanks
Don


**DONOTDELETE**
(Lurker)
2000-01-10 02:02 PM
Re: Script not running

This is what my script looks like:

variables
$x="$$"
$s="servername\"
$u=@userid$
$dir=$s+$u+$x

$g=@comment
use H: $dir
goto $g

IF INGROUP ("group name") = 1
USE G: $s group\shared name$
ELSE

ENDIF

The Home directory maps fine but it seems as if the INGROUP function is not seeing the different groups on the server not sure about just maybe. I am just not able to map with the INGROUP function.

Wilton

gdalinis
(Fresh Scripter)
2000-01-11 01:03 AM
Re: Script not running

I think the mapping statement needs to be fixed. Try this:

variables
$s="\\servername"
$u=@userid
$x="$$"
$dir=$s+"\"+$u+$x

use H: $dir

IF INGROUP("group name")
USE G: $s\group\shared name$x
ENDIF

I am guessing that the share name is hidden. I didn't understand what the goto $g line was for and I didn't know where the $g=@comment was going either. Hope this helps.

------------------
Gus Dalinis
Systems Analyst


**DONOTDELETE**
(Lurker)
2000-01-11 11:02 AM
Re: Script not running

variables
$s="\\servername"
$u=@userid
I want to thank you very much I use the information you gave me and it did not work anyway I look in the manual and use the option = 1 to tell what group I am looking for, because I am using win 95/98 and all is working great.

Thanks again

Below you will see where I add the = 1
$x="$$"
$dir=$s+"\"+$u+$x

use H: $dir

IF INGROUP("group name") = 1
USE G: "$s\group\shared name$x"
ENDIF

I also use the "" after the use G: command.

**DONOTDELETE**
(Lurker)
2000-01-27 12:47 AM
Re: Script not running

Quick comment re: the Kixstart RPC service

I don't have that service running on my DCs and the scripts seem to run just fine on my w95 PCs.

Granted, I'm not doing anything too sexy, but I am resolving usernames and groups in order to map drives.

Is it possible that the RPC service really doesn't have to run and we've been duped into wasting server resources?

Also, I never copied any Kixstart files to any of my w95 PCs.

Any thoughts?

**DONOTDELETE**
(Lurker)
2000-01-27 12:49 AM
Re: Script not running

Quick comment re: the Kixstart RPC service

I don't have that service running on my DCs and the scripts seem to run just fine on my w95 PCs.

Granted, I'm not doing anything too sexy, but I am resolving usernames and groups in order to map drives.

Is it possible that the RPC service really doesn't have to run and we've been duped into wasting server resources?

Also, I never copied any Kixstart files to any of my w95 PCs.

Any thoughts?

Jack Lothian
(MM club member)
2000-01-26 01:37 PM
Re: Script not running

Why not ask you question straight out instead of hiding it at the end of one of the longest posts in a while? Also with in the context of this forum your question is rhetorical.