Page 1 of 1 1
Topic Options
#19632 - 2002-04-08 06:38 AM Where can I learn how to create a simple login script.....?
IT_Guy Offline
Lurker

Registered: 2002-04-08
Posts: 1
Loc: Pennsylvania
Hi all!

I'm new to this, and I come here for help. I'd like to create a simple login script that displays a window indicating the usual "Use of this computer is......" (you know the drill). I'd like it to map a drive (Y:) to my server (server01) with a path of \\server01\users. The "users" folder is where the home folders are for my network users.

I'd also like to map a default printer for each user, but that could wait a bit.

Thanks in advance for your help!

Top
#19633 - 2002-04-08 07:53 AM Re: Where can I learn how to create a simple login script.....?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Hello IT_Guy and welcome to the board.

Here is some very generic code to point you in the right direction.
This code is very basic and should use other checks and things to clean it up.

I will leave that to you so that you may learn some from the experience. If you get stuck or need further assistance please don't hesitate to ask.
Also please remember to review the manual that comes with KiXtart and the FAQ section here on the board as well as using the SEARCH feature on the top right of this board.

code:
$LC=Notice:  Company Dİ"
$LN="This network/computer system is for the use of authorized users only."

SELECT
CASE @INWIN=2
$rc = ADDKEY("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Winlogon")
$rc = WriteValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Winlogon", "LegalNoticeCaption", "$LC","REG_SZ")
$rc = WriteValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Winlogon", "LegalNoticeText", "$LN","REG_SZ")

ELSE
$rc = ADDKEY("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon")
$rc = WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "LegalNoticeCaption", "$LC","REG_SZ")
$rc = WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "LegalNoticeText", "$LN","REG_SZ")
ENDSELECT

; Note that unless this folder is already shared, Windows NT/9X will not be able to map here. NT could use SUBST, but 9x can not.
i.e make sure this folder is shared.
USE Y: /DELETE /PERSISTENT
USE Y: "\\server01\users"


SELECT
CASE InGroup('MYGROUP01') SetDefaultPrinter('PRINTER01')
CASE InGroup('MYGROUP02') SetDefaultPrinter('PRINTER02')
ENDSELECT

As I said, this code should work, but is not optimized in any shape or fashion.

Give it a try and see what you can come up with, and post if you need further assistance.

Best Wishes. - [Smile]

[ 08 April 2002, 08:00: Message edited by: NTDOC ]

Top
#19634 - 2002-04-08 09:11 AM Re: Where can I learn how to create a simple login script.....?
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
You will also need to initially make a call on kix32.exe via a batchfile in the NETLOGON folder. Ie; users have "logon.bat" to execute at logon. "logon.bat" copies kix32.exe to the local harddrive if not exists laready, and then C:\kix32.exe "serverscript". An example could look like this:
code:
@ECHO OFF
CLS
ECHO *** Initing logon, please wait...

IF "%OS%" == "Windows_NT" GOTO WinNT
REM Copy kix32 locally.
IF NOT EXIST C:\KX16.DLL XCOPY %0\..\Files\Kix\KX16.DLL C:\ /D /H /I /R > NUL
IF NOT EXIST C:\KX32.DLL XCOPY %0\..\Files\Kix\KX32.DLL C:\ /D /H /I /R > NUL
IF NOT EXIST C:\KX95.DLL XCOPY %0\..\Files\Kix\KX95.DLL C:\ /D /H /I /R > NUL

:WinNT
REM Copy kix32 locally.
IF NOT EXIST C:\KIX32.EXE XCOPY %0\..\Files\Kix\KIX32.EXE C:\ /D /H /I /R > NUL

REM Starta KiXtart login script
C:\KIX32.EXE %0\..\Login.kix

There really should be made a sticky in the newbie section about this.. [Wink]

[ 08 April 2002, 09:13: Message edited by: masken ]
_________________________
The tart is out there

Top
Page 1 of 1 1


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

Who's Online
0 registered and 1046 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.051 seconds in which 0.025 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