Microsoft KB Archive/162793: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - """ to """)
 
Line 69: Line 69:
                     </pre></li>
                     </pre></li>
<li><p>Using a text editor such as Notepad, create Script1.scr with the following contents:</p>
<li><p>Using a text editor such as Notepad, create Script1.scr with the following contents:</p>
<pre class="codesample">  ? &quot;Setting DOS variables...&quot;
<pre class="codesample">  ? "Setting DOS variables..."
   SHELL &quot;winset.exe USERNAME=@USERID&quot;
   SHELL "winset.exe USERNAME=@USERID"
   SHELL &quot;Winset.exe ADDRESS=@ADDRESS&quot;
   SHELL "Winset.exe ADDRESS=@ADDRESS"
   SHELL &quot;Winset.exe COMPUTER=@WKSTA&quot;
   SHELL "Winset.exe COMPUTER=@WKSTA"
   SHELL &quot;Winset.exe DOMAIN=@DOMAIN&quot;
   SHELL "Winset.exe DOMAIN=@DOMAIN"
   SHELL &quot;Winset.exe COMMENT=@COMMENT&quot;
   SHELL "Winset.exe COMMENT=@COMMENT"
   SHELL &quot;Winset.exe FULLNAME=@FULLNAME&quot;
   SHELL "Winset.exe FULLNAME=@FULLNAME"
   SHELL &quot;Winset.exe HOMEDIR=@HOMEDIR&quot;
   SHELL "Winset.exe HOMEDIR=@HOMEDIR"
   SHELL &quot;Winset.exe HOMESHR=@HOMESHR&quot;
   SHELL "Winset.exe HOMESHR=@HOMESHR"
   SHELL &quot;Winset.exe LSERVER=@LSERVER&quot;
   SHELL "Winset.exe LSERVER=@LSERVER"
   SHELL &quot;Winset.exe PRIV=@PRIV&quot;
   SHELL "Winset.exe PRIV=@PRIV"
   ? &quot;Done.&quot;
   ? "Done."
   Call Macro.bat
   Call Macro.bat
   EXIT
   EXIT
                     </pre></li>
                     </pre></li>
<li><p>Using a text editor such as Notepad, create Macro.bat with the following contents:</p>
<li><p>Using a text editor such as Notepad, create Macro.bat with the following contents:</p>
<pre class="codesample">  SHELL &quot;winset.exe USERNAME=@USERID&quot;
<pre class="codesample">  SHELL "winset.exe USERNAME=@USERID"
   BREAK ON        ;(re)set Ctrl-C/Break handling
   BREAK ON        ;(re)set Ctrl-C/Break handling
   COLOR r+/n
   COLOR r+/n
   SMALL
   SMALL
   ? &quot;USER INFORMATION&quot;
   ? "USER INFORMATION"
   ?
   ?
   AT (4,4)
   AT (4,4)
   &quot;HI, @userid&quot;
   "HI, @userid"
   ?
   ?
   AT (6,4)
   AT (6,4)
Line 104: Line 104:
   ?
   ?
   COLOR g+/n
   COLOR g+/n
   ? &quot;WHAT TIME IS IT?&quot;
   ? "WHAT TIME IS IT?"
   ?
   ?
   ? @DAY&quot;, &quot; @DATE
   ? @DAY", " @DATE
   ?
   ?
   ? @TIME
   ? @TIME
   ?
   ?
   ? &quot;This is the &quot; @WDAYNO &quot;the day of the week&quot;
   ? "This is the " @WDAYNO "the day of the week"
   ?
   ?
   ? &quot;This is day Number &quot; @YDAYNO &quot; of &quot; @YEAR
   ? "This is day Number " @YDAYNO " of " @YEAR
   ?
   ?
   ? &quot;This is Day Number &quot; @MDAYNO &quot; of Month Number &quot; @MONTHNO
   ? "This is Day Number " @MDAYNO " of Month Number " @MONTHNO
   ?
   ?
   ? @MONTH &quot;, &quot; @YEAR
   ? @MONTH ", " @YEAR
   ?
   ?
   SLEEP 10
   SLEEP 10
Line 123: Line 123:
   ?
   ?
   COLOR m+/n
   COLOR m+/n
   ? &quot;COMPUTER INFORMATION&quot;
   ? "COMPUTER INFORMATION"
   ?
   ?
   ? &quot;MAC Address of your Network Card:&quot;
   ? "MAC Address of your Network Card:"
   ? @ADDRESS
   ? @ADDRESS
   ?
   ?
   ? &quot;Netbios Computer Name:&quot;
   ? "Netbios Computer Name:"
   ? @WKSTA
   ? @WKSTA
   ?
   ?
   ? &quot;Version of Windows You are Running:&quot;
   ? "Version of Windows You are Running:"
   ? &quot;1 = Windows NT,    2 = Windows 95&quot;
   ? "1 = Windows NT,    2 = Windows 95"
   ? @INWIN
   ? @INWIN
   ?
   ?
   ? &quot;Your Operating System's Version Number:&quot;
   ? "Your Operating System's Version Number:"
   ? @DOS
   ? @DOS
   ?
   ?
Line 143: Line 143:
   ?
   ?
   COLOR c+/n
   COLOR c+/n
   ? &quot;NETWORK INFORMATION&quot;
   ? "NETWORK INFORMATION"
   ?
   ?
   ? &quot;Logon Domain Name:&quot;
   ? "Logon Domain Name:"
   ? @DOMAIN
   ? @DOMAIN
   ?
   ?
   ? &quot;Home Directory Location:&quot;
   ? "Home Directory Location:"
   ? @HOMESHR &quot;\&quot; @HOMEDIR
   ? @HOMESHR "\" @HOMEDIR
   ?
   ?
   ? &quot;Directory Where Network Software Resides:&quot;
   ? "Directory Where Network Software Resides:"
   ? @LANROOT
   ? @LANROOT
   ?
   ?
Line 158: Line 158:
   ?
   ?
   COLOR y+/n
   COLOR y+/n
   ? &quot;Logon Server:&quot;
   ? "Logon Server:"
   ? @LSERVER ;logon server
   ? @LSERVER ;logon server
   ?
   ?
   ? &quot;Drive That is Redirected to \\logonserver\NETLOGON:&quot;
   ? "Drive That is Redirected to \\logonserver\NETLOGON:"
   ? @LDRIVE
   ? @LDRIVE
   ?
   ?
   ? &quot;Network Software Version:&quot;
   ? "Network Software Version:"
   ? @LM
   ? @LM
   ?
   ?
   ? &quot;Your Password is &quot; @PWAGE &quot; Days Old.&quot;
   ? "Your Password is " @PWAGE " Days Old."
   ? &quot;The Maximum Password Age is &quot; @MAXPWAGE &quot; Days.&quot;
   ? "The Maximum Password Age is " @MAXPWAGE " Days."
   ? &quot;You Are Logged on With &quot; @PRIV &quot; Privileges.&quot;
   ? "You Are Logged on With " @PRIV " Privileges."
   ?
   ?
   SLEEP 10
   SLEEP 10
Line 175: Line 175:
   ?
   ?
   ?
   ?
   If INGROUP(&quot;Domain Admins&quot;)
   If INGROUP("Domain Admins")
   DISPLAY &quot;Z:\Admins.txt&quot;
   DISPLAY "Z:\Admins.txt"
   ELSE
   ELSE
   DISPLAY &quot;Z:\Users.txt&quot;
   DISPLAY "Z:\Users.txt"
   ENDIF
   ENDIF
   SLEEP 3
   SLEEP 3
   ?
   ?
   COLOR b+/n
   COLOR b+/n
   ? &quot;Thank you for Test Driving Version &quot; @KIX &quot; of...&quot;
   ? "Thank you for Test Driving Version " @KIX " of..."
   BIG
   BIG
   ? &quot;KiXtart!!&quot;
   ? "KiXtart!!"
   sleep 4
   sleep 4
   SMALL
   SMALL
   MESSAGEBOX (&quot;This Concludes This Test of the KiXtart Logon Script!&quot;,
   MESSAGEBOX ("This Concludes This Test of the KiXtart Logon Script!",
       &quot;KiXtart&quot;, 0)
       "KiXtart", 0)
   EXIT
   EXIT
                     </pre></li>
                     </pre></li>
Line 198: Line 198:


</div></li>
</div></li>
<li>Using a text editor such as Notepad, create &quot;Users.txt&quot; with the following contents:
<li>Using a text editor such as Notepad, create "Users.txt" with the following contents:
<div class="indent">
<div class="indent">



Latest revision as of 11:01, 21 July 2020

Knowledge Base


How to Set Up KiXtart Logon Scripts for a Windows 95 Client

Article ID: 162793

Article Last Modified on 11/4/2003



APPLIES TO

  • Microsoft Windows NT Server 4.0 Standard Edition
  • Microsoft Windows 95



This article was previously published under Q162793

SUMMARY

This article describes how to set up Windows 95 Clients for use with KiXtart logon scripts. What follows is an example that uses the most commonly requested KiXtart functions.

The version of KiXtart supplied with the Windows NT 4.0 Resource Kit is 3.21. To obtain a newer version of KiXtart, please refer to the following Kixtart Web site:

MORE INFORMATION

  1. Use User Manager to create a new user with the Username of USER.
  2. Enter the file name Script1.bat in the Logon Script Name dialog box.
  3. Using a text editor such as Notepad, create Script1.bat with the following contents:

       @ECHO OFF
       Z:\kix32.exe script1.scr
       EXIT
                        
  4. Using a text editor such as Notepad, create Script1.scr with the following contents:

       ? "Setting DOS variables..."
       SHELL "winset.exe USERNAME=@USERID"
       SHELL "Winset.exe ADDRESS=@ADDRESS"
       SHELL "Winset.exe COMPUTER=@WKSTA"
       SHELL "Winset.exe DOMAIN=@DOMAIN"
       SHELL "Winset.exe COMMENT=@COMMENT"
       SHELL "Winset.exe FULLNAME=@FULLNAME"
       SHELL "Winset.exe HOMEDIR=@HOMEDIR"
       SHELL "Winset.exe HOMESHR=@HOMESHR"
       SHELL "Winset.exe LSERVER=@LSERVER"
       SHELL "Winset.exe PRIV=@PRIV"
       ? "Done."
       Call Macro.bat
       EXIT
                        
  5. Using a text editor such as Notepad, create Macro.bat with the following contents:

       SHELL "winset.exe USERNAME=@USERID"
       BREAK ON         ;(re)set Ctrl-C/Break handling
       COLOR r+/n
       SMALL
       ? "USER INFORMATION"
       ?
       AT (4,4)
       "HI, @userid"
       ?
       AT (6,4)
       @FULLNAME        ;full name of current user
       ?
       AT (8,4)
       @COMMENT         ;user comment in User Manager
       ?
       SLEEP 10
       CLS
       ?
       COLOR g+/n
       ? "WHAT TIME IS IT?"
       ?
       ? @DAY", " @DATE
       ?
       ? @TIME
       ?
       ? "This is the " @WDAYNO "the day of the week"
       ?
       ? "This is day Number " @YDAYNO " of " @YEAR
       ?
       ? "This is Day Number " @MDAYNO " of Month Number " @MONTHNO
       ?
       ? @MONTH ", " @YEAR
       ?
       SLEEP 10
       CLS
       ?
       ?
       COLOR m+/n
       ? "COMPUTER INFORMATION"
       ?
       ? "MAC Address of your Network Card:"
       ? @ADDRESS
       ?
       ? "Netbios Computer Name:"
       ? @WKSTA
       ?
       ? "Version of Windows You are Running:"
       ? "1 = Windows NT,     2 = Windows 95"
       ? @INWIN
       ?
       ? "Your Operating System's Version Number:"
       ? @DOS
       ?
       SLEEP 10
       CLS
       ?
       ?
       COLOR c+/n
       ? "NETWORK INFORMATION"
       ?
       ? "Logon Domain Name:"
       ? @DOMAIN
       ?
       ? "Home Directory Location:"
       ? @HOMESHR "\" @HOMEDIR
       ?
       ? "Directory Where Network Software Resides:"
       ? @LANROOT
       ?
       SLEEP 10
       CLS
       ?
       COLOR y+/n
       ? "Logon Server:"
       ? @LSERVER ;logon server
       ?
       ? "Drive That is Redirected to \\logonserver\NETLOGON:"
       ? @LDRIVE
       ?
       ? "Network Software Version:"
       ? @LM
       ?
       ? "Your Password is " @PWAGE " Days Old."
       ? "The Maximum Password Age is " @MAXPWAGE " Days."
       ? "You Are Logged on With " @PRIV " Privileges."
       ?
       SLEEP 10
       CLS
       ?
       ?
       If INGROUP("Domain Admins")
       DISPLAY "Z:\Admins.txt"
       ELSE
       DISPLAY "Z:\Users.txt"
       ENDIF
       SLEEP 3
       ?
       COLOR b+/n
       ? "Thank you for Test Driving Version " @KIX " of..."
       BIG
       ? "KiXtart!!"
       sleep 4
       SMALL
       MESSAGEBOX ("This Concludes This Test of the KiXtart Logon Script!",
          "KiXtart", 0)
       EXIT
                        
  6. Using a text editor such as Notepad, create Admins.txt with the following contents:

    This is from the Admins.txt file.

  7. Using a text editor such as Notepad, create "Users.txt" with the following contents:

    This is from the Users.txt file.

  8. Place the following files in the NETLOGON share of every domain controller:

       Kix32.exe (Located on the Windows NT 4.0 Resource Kit CD-ROM)
       KIX32.DLL (Located on the Windows NT 4.0 Resource Kit CD-ROM)
       KIX16.DLL (Located on the Windows NT 4.0 Resource Kit CD-ROM)
       MSVCRT.DLL (Located on the Windows NT 4.0 CD-ROM)
       WINSET.EXE (Located on the Windows 95 CD-ROM)
       SCRIPT1.BAT (The file listed above in step 3)
       SCRIPT1.SCR (The file listed above in step 4)
       MACRO.BAT (The batch file called by Script1.scr)
       ADMINS.TXT
       USERS.TXT
                        
  9. Log on as FRED from the Windows 95 Client. The KiXtart script should now run.


Keywords: kbhowto KB162793