#19632 - 2002-04-08 06:38 AM
Where can I learn how to create a simple login script.....?
|
IT_Guy
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
   
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]](images/icons/smile.gif) [ 08 April 2002, 08:00: Message edited by: NTDOC ]
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 837 anonymous users online.
|
|
|