NET USE Z: \\YOURSERVER\VOLUMENAME /PERSISTENT:YES -- ----------------------- --------------- | | | UNC path of file server to map drive letter to. Local drive letter to map the UNC path to.
You can use 'runas /user:administrator cmd' to get a DOS shell that is running as the Adminsitrator, then from that shell, invoke 'services.msc' to bring up the services panel as Administrator so that you can make changes the currently logged in user can't.
net user fred MyPassword /add
..which will add the new user 'fred' with the password 'MyPassword'. See 'net user /?' for more info.
To add a user to a particular group, see 'net group /?'.
C:\>net session Computer User name Client Type Opens Idle time ------------------------------------------------------------------------------- \\ONTARIO FRED Unix 1 00:03:02 \\TAHOE JACKIE Unix 2 00:08:19
..which shows remote hosts 'ontario' and 'tahoe' are accessing the local drive(s) being shared.
The following commands change the primary and secondary nameservers to new values under winnt:
reg update HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters\NameServer="192.168.0.1 192.168.0.2" reg update HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\NameServer="192.168.0.1 192.168.0.2"This change takes effect immediately.
Of interest; you can easily change *remote machines* by specifying the remote hostname at the end of the above command line, in this case the remote host 'popeye' is modified:
reg update HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters\NameServer="192.168.0.1 192.168.0.2" \\popeye reg update HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\NameServer="192.168.0.1 192.168.0.2" \\popeye
HKEY_LOCAL_MACHINE\SOFTWARE \Microsoft \Windows NT \CurrentVersion \Winlogon DontDisplayLastUserName REG_SZRange: 0 or 1; 1 enables this feature. The Last Username Display can also be hidden without editing the Registry directly if the user has NT Resource Kit.
Click Start\ProgramsResource Kit 4.0 2. Click Configuration\C2 Comnfiguration 3. Double click the line that reads "Last Username Display" 4. Place a check in Hide the last username to login. 5. Click Secure then OK.
NET SEND * ### The network server going down for maintenance at 9pm! ###
IPCONFIG /RELEASE, IPCONFIG /RENEW
And besides, if you fuck things up, what do you loose really? You just have to reinstall WinNT. Surely you're used to that by now.
Work In Progress
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters\NameServer HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\NameServer
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\EnvironmentTo tweak these variables, you can use REG (see notes below), eg:
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment\FOO=bar" REG_SZ..and to see if it got set:
REG QUERY "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment\FOO"To apply changes to a remote machine, just append \\HOSTNAME to the above, eg:
REG QUERY "HKEY_LOCAL_MACHINE\What\Ever=text" REG_SZ \\MYSERVERNOTE: Unfortunately, for such changes to actually affect a new MSDOS window, you must first either:
I don't know if there's a way to make the changes work right away from the command line. Send me email if you know the way.