Discussion Locked

login scripts

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Does anyone have examples of login scripts for NT? Not just the basics I pretty much understand that but the more advanced scripts i.e. for groups, how to disconnect an already mapped drive and reconnect it with same letter to a different share via script. Send me as much info that you can get your hands on.

5 replies

by bernd

Hi, you shuold look at Kix32 which is a script language and comes with the NT Resource Kit. It offers all of the features you need. Mapping drives, reading and writing the Registry etc.
Here are some Examples:

color y+/n
settime "\\SERVER1"
;----------- Windows NT --------------------
if @inwin = "1"
$OS = "WINDOWS NT"
endif
;------------ Windows 95 -------------------
if @inwin = "2"
$OS = "WINDOWS 95"
$key = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Network"
$variable = "DisablePwdCaching"
$value = "1"
if existkey ($key) <> 0
$result = addkey ($key)
if @error = 0
$result = writevalue($key,$variable,$value,"REG_DWORD")

shell "command.com /c del c:\windows\*.pwl"
;--- Main Group Membership --------
if ingroup ("Domain Users")
use i: "\\Server1\Sharing"
endif
;--- Main Group Membership -------
if ingroup ("Your Group")
use f: "\\Server1\HiddenSharing$$"
endif

This discussion is closed to new replies.