Page 1 of 1 1
Topic Options
#47990 - 1999-08-03 04:22 PM NT/95 kixtart bat file/script not working?
Anonymous
Unregistered


As a VERY new user, having problems getting the following logon script to run...All I'm really trying to do is map users according to their group memberships to various drives and hide other drives from view. Also trying to map users directly to their own home directories at logon...Any suggestions greatly appreciated! Here's the script...


CLS

:TIME
; REM Synchronize local time with PDC
SETTIME "\\MAIN" /SET /YES

:ADMIN
IF @priv = "ADMIN"
GOTO ADMINBOX
ELSE
GOTO USERBOX
ENDIF
GO TO END

:ADMINBOX
; REM Display box for Administrators
SMALL ;display in small character mode
COLOR b+/n
BOX (0,0,24,79,GRID) ;"background grid"
COLOR b/n
BOX (8,21,18,61,A) ;"shadow of the box"
COLOR g+/n
BOX (7,20,17,60,FULL)

COLOR r+/n
AT (9,25) "Hello, @fullname, please wait while your logon script executes..."

; REM Display variable names
COLOR w+/b
AT (11,25) "UserID :" ;display some text strings
AT (12,25) "Full Name :"
AT (13,25) "Privilege :"
AT (14,25) "Workstation :"
AT (15,25) "Domain :"
AT (16,25) "Logon Server :"
COLOR r+/n
AT (17,22) "PLEASE WAIT WHILE LOGON IS VALIDATED"

; REM Display NT variables
COLOR y+/n
AT (11,40) @Userid :display some macros
AT (12,40) @fullname
AT (13,40) @privilege
AT (14,40) @workstation
AT (15,40) @domain
AT (16,40) @lserver
COLOR r+n ;wait 5 seconds
SLEEP 5
CLS
GOTO ASSVAR

:USERBOX
; REM Display for Box for Users
SMALL
COLOR b+/n
BOX (0,0,24,79,GRID)
COLOR b/n
BOX (8,21,18,61,A)
COLOR g+/n
BOX (7,20,17,60,FULL)

; REM Display variable names
COLOR w+/b
AT (11,25) "UserID :"
AT (12,25) "Full Name :"
AT (13,25) "Privilege :"
AT (14,25) "Workstation :"
AT (15,25) "Domain :"
AT (16,25) "Logon Server :"
COLOR r+/n
AT (17,22) "PLEASE WAIT WHILE LOGON IS VALIDATED"

; REM Display NT variables
COLOR y+/n
AT (11,40) @Userid
AT (12,40) @ fullname
AT (13,40) @privilege
AT (14,40) @workstation
AT (15,40) @domain
AT (16,40) @lserverCOLOR r+.n
SLEEP 5
CLS
GOTO ASSVAR


:ASSVAR
; REM Set user variables
$x="$$"
$userid=@userid + "$$"
USE H: "\\CORP\$userid" ;maps user home directory
USE S: "\\CORP\SHARE" ;standard map drive
IF INGROUP ("EVERYONE") ;drive mapped based on group membership
USE T: "\\SQL\DRISCOLL"

SLEEP 5
:END
;REM QUIT SCRIPT
CLS
EXIT
:

Top
#47991 - 1999-08-06 04:34 AM Re: NT/95 kixtart bat file/script not working?
Anonymous
Unregistered


IF INGROUP ("EVERYONE") ;drive mapped based on group membership
USE T: "\\SQL\DRISCOLL"
ENDIF

Top
#47992 - 1999-08-09 03:47 PM Re: NT/95 kixtart bat file/script not working?
Anonymous
Unregistered


Thanks! Removed $x="$$", $userid=@userid + "$$" and USE H: "CORP\"userid" and script works fine EXCEPT still not mapping 95 clients to home directories at \\CORP\users, suggestions greatfully accepted...
Top
#47993 - 1999-08-10 11:17 AM Re: NT/95 kixtart bat file/script not working?
Anonymous
Unregistered


I have their homedrive specified in their account in usermanager and use

USE H: @HOMESHR

Top
#47994 - 1999-08-11 01:31 AM Re: NT/95 kixtart bat file/script not working?
Anonymous
Unregistered


In w95 it could be that you try to map over an existing drive mapping. If that is the case you first need to remove that drive mapping.

ex:
USE H: /d
DELKEY("HKEY_CURRENT_USER\Network\Persistent\H")
USE H: "\\CORP\$userid" ;maps user home directory

------------------
Lon Geefshuysen,
www.xs4all.nl/~longeef/NT/KiXtart
lon_geefshuysen@essentium.com


Top
Page 1 of 1 1


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

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

Generated in 0.111 seconds in which 0.063 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