by
© 1996/7
WARNING : SOME OF THE COMMANDS AVAILABLE TO THE LOGIN SCRIPT ARE CAPABLE OF MAKING THE COMPUTER (and all computers that run the script) UNUSABLE. ONE WRONG REGISTRY EDIT IN A CENTRAL SCRIPT CAN VERY QUICKLY RENDER HUNDREDS OF COMPUTERS IN-OPERABLE.
WINDOWS 95, WINDOWS NT and NEXUS are either registered trademarks or products written and owned my Microsoft Corporation. This program has no affiliation with Microsoft so do not direct any questions about it to Microsoft. Microsoft can be found at http://www.microsoft.com.au .
NOTE : Version 1.3 no longer uses the ORDER configuration option, instead use the "<" command to include files in any order you wish. Version 1.3 no longer uses the user data file or a separate macros file - instead the ! macro command is used to define macros in the script file. To access server information such as time, full name and group information it is required to obtain NEXUS.EXE from Microsoft's web site and copy RADMIN32.DLL and RLOCAL32.DLL into the Jewel subdirectory. Note also the syntax for filenames is now consistent so [filename] is now replaced with "filename", and although not mandatory it is advisable to use "filename" for all filenames on the left hand side of the '=' sign. On the right hand side of the '=' use just filename with no quotes. This was done to avoid confusion between the '.' in filenames and the '.' in the script.
Introduction
Jewel is a program that allows Windows 95 computers to have a series of complex login instructions executed, including user and machine specific macros. The results of the login script are stored in the registry. Commands include making directories, copying files, registry edits, INI file editing and several others.
It can be used in conjunction with policies - or stand alone, if used in conjunction with policies Jewel should be executed in the NT logon script, if not it can be executed either in the NT logon script or in the STARTUP group.
Configuration File (Jewel.Ini)
This file is stored in the same directory as the main Jewel.EXE file. I know I could have put this in the registry, but as an admin myself, having Jewel.EXE and Jewel.INI in the NETLOGON directory of the server is easier to do. The file as the following configuration options all in the format Option=Setting
Script
Primary Script to execute.
Notice
The location of the news of the day notice file. This file is an RTF file formatted 8cm width with no margins which is displayed in the login script window when it is executed. If the file is at least 1 day old, the age of the file in days is displayed as well. If the file is less than 3 days old then the heading is displayed in green.
Commands
Commands are one line per command, and macros (enclosed by ‘%’) are expanded completely before any script execution is done. Each command code is a single character, followed by parameters which generally follow the format Destination=Source.
A comment, this is ignored.
Do a HKEY_LOCAL_MACHINE registry edit. The format of the line is :
M\Key1\Key2\Key3.Keyname=Value
where the first characters of value represent the type of data; ‘S’ for a string, ‘D’ for an decimal integer, ‘D$’ for a hex integer and ‘B’ is binary data (e.g. BFA 01 A4). If Value is ‘-‘ then the Keyname is deleted.
Do a HKEY_CURRENT_USER registry edit. The format of the line is :
U\Key1\Key2\Key3.Keyname=Value
where the first characters of value represent the type of data; ‘S’ for a string, ‘D’ for an decimal integer, ‘D$’ for a hex integer and ‘B’ is binary data (e.g. BFA 01 A4). If Value is ‘-‘ then the Keyname is deleted.
Note unless the L (connect user registry) is performed before this, the entry may go into the HKEY\.Default as this is the current user during the login script execution on Windows 95.
Do a HKEY_CLASSES_ROOT registry edit. The format of the line is :
R\Key1\Key2\Key3.Keyname=Value
where the first characters of value represent the type of data; ‘S’ for a string, ‘D’ for an decimal integer, ‘D$’ for a hex integer and ‘B’ is binary data (e.g. BFA 01 A4). If Value is ‘-‘ then the Keyname is deleted.
Connect a printer in the following format :
P<local>=\\SERVER\PRINTER
e.g.
PLPT1=\\MYSERVER\HPLaserJet
Connect a drive in the following format :
D<drive>:=\\SERVER\SHARENAME
e.g.
DH:=\\SERVER\%UID%$
Copy file with overwrite in the following format :
C<destiation>=<origin>
e.g.
CC:\MAIL\EUDORA.INI=Z:\FILES\_Eudora.def
Same as ‘C’ except no overwrite of existing files
Make a directory including intermediate directories.
e.g. VC:\TEMP
Edit INI file settings. The INI file must already exists (use the ‘c’ copy no overwrite to ensure a default INI file exists first). The structure is I[Filename]Section.ValueName=Value. An example is
I[C:\MAIL\EUDORA.INI]Settings.Fullname=%Fullname%.
This connects the registry data in a USER.DAT file to HKEY_USERS/<username> so that any following registry edits occur in the users personal profile. The normal Win95 logon procedure has not done this by the logon script execution time.
e.g.
LH:\USER.DAT
Include for processing another file e.g. <%Group%.TXT will include a script file named by the group.
e.g.
<%Root%\Extrascript.txt
Either use "T-" to set the time from the authenticating server - or Tserver to specify an NT
Server to set the client time from.
e.g.
TTIMESERVER
Use "!Macroname=Macro string", to create a macro which can later be referenced by %Macroname%.
e.g.
!MainServer=MYMAINSERVER
examples :
to test group membership in group normal try
?+[Normal.IN.%Group%]<Normal.txt
to test for not STUDENT try
?-[STUDENT.=.%UID%]<Extra.txt
to test for one of a couple uids try
?[%UID%.IN.Bob,Ted,Alice]<Nice.txt
Script Box
SAMPLE JEWEL.INI stored with JEWEL.EXE in \\SERVER\NETLOGON :
Notice=Z:\GLOBAL\NOTICE.RTF
Script=Z:\Script.TXT
Sample Script.txt login script (which calls MainScript.txt) :
; Define some macros
!HomeDir=H:
!UserReg=USER.DAT
!POPServer=pop.mydomain.org
!EMailDomain=mydomain.org
!Department=My department, My organisation
!MailDir=%HomeDir%\MAIL
!DetachDir=%MailDir%\DETACH.DIR
!MailConfig=%MailDir%\EUDORA.INI
!SystemINI=C:\WINDOWS\SYSTEM.INI
!NewsServer=news.mydomain.org
!WWWServer=http://www.mydomani.org
!MainServer=SERVER1
!UnixServer=SERVER2
!NetscapeReg=\Software\Netscape\Netscape Navigator
!WindowsReg=\Software\Microsoft\Windows\CurrentVersion
!Policies=%WindowsReg%\Policies
!CacheDir=C:\CACHE
!CopyFiles=Z:\FILES
!UserScripts=Z:\USER
!MachineScripts=Z:\MACHINE
!GroupScripts=Z:\GROUP
!Root=Z:
!Admin=YourName
; Run MainScript.txt for all but STUDENT logins
?-[%UID%.=.STUDENT]<%Root%\MainScript.txt
; Include Script to ensure proxy used for netscape users
<%Root%\Proxy.txt
; Include a personal script
<%UserScripts%\%UID%.TXT
; Include a machine specific script
<%MachineScripts%\%Machine%.TXT
Sample MainScript.txt main login script :
; Get the
time from the authenticating server
T-
; Attach printer to LPT3 port
PLPT3=\\%MainServer%\HP
; attach users home directory to the H: drive
DH:=\\%MainServer%\%UID%$
; Copy a default USER.DAT if one does not exist
c"%HomeDir%\%UserReg%"=%CopyFiles%\%UserReg%
; Link to the H:\USER.DAT file for all registry
L%HomeDir%\%UserReg%
; Set S: to be a software drive
DS:=\\%MainServer%\SOFTWARE
; Create the detach directory
V%DetachDir%
; Create a default EUDORA.INI file (if one doesn't exist)
c"%MailConfig%"=%CopyFiles%\EUDORA.DAT
; Set the INI settings for the current user
I"%MailConfig%".Settings:RealName=%NiceName%
I"%MailConfig%".Settings:POPAccount=%UIDL%@%POPServer%
I"%MailConfig%".Settings:ReturnAddress=%UID%@%EMailDomain%
I"%MailConfig%".Settings:SavePassword=1
I"%MailConfig%".Settings:AutoReceiveAttachmentsDirectory=%DetachDir%
I"%MailConfig%".Settings:PrinterFontSize=10
; Copy a default bookmark file
c"H:\NETSCAPE\BOOKMARK.HTM"=%CopyFiles%\BOOKMARK.HTM
; point to it.
U%NetscapeReg%\Bookmark List.File Location=SH:\NETSCAPE\BOOKMARK.HTM
; set up the netscape cache
U%NetscapeReg%\Cache.Disk Cache Size=D$1000
U%NetscapeReg%\Cache.Memory Cache Size=D$0800
; make the cache directory
V%CacheDir%
U%NetscapeReg%\Cache.Cache Dir=S%CacheDir%
; set all the paths for explorer to relevant locations
U%WindowsReg%\Explorer\Shell Folders.Desktop=SH:\Desktop
U%WindowsReg%\Explorer\Shell Folders.Programs=SH:\Start\Programs
U%WindowsReg%\Explorer\Shell Folders.Fonts=SC:\WINDOWS\Fonts
U%WindowsReg%\Explorer\Shell Folders.Recent=SH:\Recent
U%WindowsReg%\Explorer\Shell Folders.SendTo=SC:\Sendto
U%WindowsReg%\Explorer\Shell Folders.Personal=SH:\
U%WindowsReg%\Explorer\Shell Folders.Startup=SH:\Start\Programs\Startup
U%WindowsReg%\Explorer\Shell Folders.Start Menu=SH:\Start
U%WindowsReg%\Explorer\Shell Folders.NetHood=SH:\Nethood
U%WindowsReg%\Explorer\Shell Folders.Templates=SC:\WINDOWS\ShellNew
U%WindowsReg%\Explorer\Shell Folders.Favorites=SH:\Favorites
U%WindowsReg%\Explorer\User Shell Folders.Desktop=SH:\Desktop
U%WindowsReg%\Explorer\User Shell Folders.Programs=SH:\Start\Programs
U%WindowsReg%\Explorer\User Shell Folders.Recent=SH:\Recent
U%WindowsReg%\Explorer\User Shell Folders.Personal=SH:\
U%WindowsReg%\Explorer\User Shell Folders.Startup=SH:\Start\Programs\Startup
U%WindowsReg%\Explorer\User Shell Folders.Start Menu=SH:\Start
U%WindowsReg%\Explorer\User Shell Folders.Favorites=SH:\Favorites
U%WindowsReg%\Policies\Explorer.NoDrives=D$0000
; Configure windows for current logged in user
M%WindowsReg%.RegisteredOrganization=S%Department%
M%WindowsReg%.RegisteredOwner=S%Nicename%
Ordering/Pricing
Jewel is distributed under the shareware concept. To register this product and therefore legalise the use of it for more than 30 days please fill in the registration form on the next page. E-Mail me at mindware@mindware.com.au if you have questions relating to bulk discounts and problems - but at this stage I cannot accept electronic orders.
Pricing for Jewel is $79/primary server for educational institutions and $199/primary server for commercial or any other intitutions. Prices are in Australian dollars at the time.
Bulk discounts are available starting at 20 copies, please e-mail me at mindware@mindware.com.au to discuss.
If there is any additions, comments, bugs etc please e-mail me at mindware@mindware.com.au.
NOTE : Damages caused by malfunctioning of this program for any reason or in any way are limited in value to the refund of purchase price of the offending unit.
Jewel ORDER FORM
Remit to: Mindware P.O. Box 9
Richlands, Qld 4077 Australia
I take VISA or MasterCard (or Bankcard for Australian/NZ customers).
Mail orders to above address
NOTE : Purchasers will get two versions - one version is the full version that works with NEXUS.EXE, the other is limited and does not require the RADMIN32.DLL file from NEXUS.EXE.
Please register me as a Jewel user for use in (please tick boxes categories).
User Category | Quantity | Total ($AUS) |
Educational institution (University etc.) @ $69/primary server | ||
Normal licence @ $199/primary server | ||
TOTAL (Australian Dollars on Australian Bank) |
Payment by
( __)CHEQUE
(__ )VISA
(__ )MC
(__ ) B/C (AUST N/Z only)
** Note CHEQUE on AUSTRALIAN BANK IN AUSTRALIAN DOLLARS Made out to MindWare
Name: ________________________________________________________________________
Company (ONLY if company address): _____________________________________________
Address: ______________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
Voice Day Phone: ______________________ Evening: ________________________________
CREDIT CARD DETAILS
Name on Card :_________________________________________________________________
Card #: _________________________________ Exp. Date: _____________________________
Signature of cardholder: _________________________________________________________