<<>A couple more things. 1- You can also change your
network settings on the
>fly on Windows 95 and Windows NT, so that is not an issue.
Hmm... last month, I had the distasteful experience of configuring a
brand-spankin'-new Compaq 266MHz Pentium II machine with Compaq-installed
Windows 95 to use dial-up networking with a hard-wired IP address. Every
network configuration change I made required that I reboot. "You have
changed your network settings. Do you want to reboot now?" No, I didn't, but
that wasn't a choice.
How do I get Win95 to change its IP address and such without
rebooting?>>
Denys will have to enlighten us about Win95, but I can say a few things
about NT.
The "net" command is a little-known interface to the networking (and other)
subsystems on both Win9x and NT. You can start, stop, and configure a
variety of subsystems using variations on the command. Of specific interest
for this question, the "net stop" command shuts down a given subsystem, and
"net start" starts it up (OK, so that's worth a "duuh!"). Since many
subsystems read their configuration information from the registry at
startup, stopping and then starting the subsystem will accomplish the same
changes as a reboot.
The Workstation service is the basic network service upon which most other
services rely, and is the one that is interested in the low-level
information like protocols and addresses. Stopping and starting the
Workstation will cause changes in these settings to take effect.
However, depending on the box, it might be about as much trouble to stop and
re-start the network-dependent services as it would be to reboot the box.
For example, the following is the list of network-related services currently
running on my box:
C:\NTW>net start
These Windows NT services are started:
Computer Browser
EventLog
Messenger
MMIndexer
Net Logon
NT LM Security Support Provider
Plug and Play
Protected Storage
Remote Access Autodial Manager
Remote Access Connection Manager
Remote Procedure Call (RPC) Service
Schedule
Server
Simple TCP/IP Services
SNMP
Spooler
TCP/IP NetBIOS Helper
Telephony Service
UPS
WinFax PRO
Workstation
The command completed successfully.
I haven't tried it, but I suspect that stopping and restarting all of these
wouldn't save all that much time over a reboot. Although the shutdown is
accelerated by the dependencies-most services depend on the Workstation, so
stopping it will stop most of the other services also. But the same is not
true of starting them back up; you have to start the services individually,
and you have to start lower-level services before starting services that are
dependent on others to already be running.
Since a picture is worth quite a few words, here's the actual display
transcript of an IP-address change (on a different box with a much smaller
set of running services):
D:\>ipconfig
Windows NT IP Configuration
Ethernet adapter El90x1:
IP Address. . . . . . . . . : 140.178.173.150
Subnet Mask . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . : 140.178.173.1
D:\>net stop workstation
The following services are dependent on the Workstation
service.
Stopping the Workstation service will also stop these
services.
Computer Browser
Messenger
Do you want to continue this operation? (Y/N) [N]: y
The Computer Browser service is stopping.
The Computer Browser service was stopped successfully.
The Messenger service is stopping.
The Messenger service was stopped successfully.
The Workstation service is stopping.
The Workstation service was stopped successfully.
[At this point I switched to Control Panel.Networks and changed the IP
address of the box to .151. Since the network was not running, I was not
prompted to reboot the box.]
D:\>ipconfig
Windows NT IP Configuration
Ethernet adapter El90x1:
IP Address. . . . . . . . . : 140.178.173.151
Subnet Mask . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . : 140.178.173.1
D:\>net start workstation
The Workstation service is starting..
The Workstation service was started successfully.
At this point I can access the network using the new IP address.
It's worth the time to spend a few minutes poking around with "net help" and
related commands.
Steve
|