Introduction | Installation | Creating Setup Files | Loading Setup Files | Licensing | FAQ | About the Author
Creating Setup Configurations
There are two basic ways to create
setup configuration (or “.nsw” files) for NetSwitcher:
Method One - “Setup and
Save”
1. Using this method you go through the manual process of setting
each value the way you want it in the Networking Control Panel. I
recommend this method at the beginning as it makes sure that you
have each value set just the way you want it.
2. After you have changed your setup, you must reboot Windows 95.
3. After rebooting, you can now run NetSwitcher. Choose your
network adapter from the menu dropdown box and choose SAVE. Be
sure you save it under a different filename from any previously
saved setups unless you are wanting to replace that setup. Each
setup is stored in it’s own file.
4. Repeat the steps 1-3 above until you have created all the
setups you need.
Method Two - “Copy and
Edit”
1. The setup files (i.e. “.nsw” files) are ASCII files
and can be edited with any text editor. For example, you could
edit one of your saved setups in the Windows NOTEPAD editor.
Following is what one of the setup files looks like:
# # NetSwitcher Setup File # NETSWITCHER_FILE_VERSION '1.0' Adapter ‘Dial-Up Adapter’ #AutoApply IPAddress ‘123.4.5.6’ IPMask ‘255.255.255.0’ DefaultGateway ‘’ NameServer ‘123.4.5.10’ HostName ‘joebob’ Domain ‘supernet.com’ SearchList ‘’ LMHostFile ‘C:\WINDOWS\lmhosts’ NameServer1 ‘’ NameServer2 ‘’ #ScopeID EnableDNS ‘1’ NodeType ‘1’ ComputerName ‘MY COMPUTER’ Workgroup ‘MY WORKGROUP’ NTLogon ‘NO’ NTDomain ‘MY NT SERVER’ IpxFrame `4’ #DHCPWINS NODHCPWINS #RunCommand 'C:\MYPROGRAM\RUNME -ANY Arguments to here' # # End of NetSwitcher Setup File #
All you need to do is make the changes you want to the different setup values and save this out as a replacement for the current setup file, or do a SAVE AS to create a new setup file. If you leave the value BLANK after the setup directive, it will be set to BLANK. If you comment out the line (with a “#” in the first column, that setup parameter will not be changed from it’s current value.
Here is a description of each of the configuration file directives:
(Directives marked with a “*” will require a reboot after they are changed)
NETSWITCHER_FILE_VERSION
Don’t mess with this one. If it’s wrong or different, NetSwitcher will not install this setup file.
Adapter
This is the name of the adapter to apply the setup to. If this line is not included in the setup file, then one of the adapters must be selected from the Network Adapter combobox.
AutoApply
If this line is present (and uncommented) NetSwitcher will automatically (i.e. without user intervention) apply the setup as specified in the file being loaded. If there is an error in the file, however, the AutoApply will be ignored. The NetSwitcher window will not appear if a “.nsw” file containing AutoApply is double-clicked or dropped onto the NetSwitcher icon. If a reboot is reguired, NetSwitcher will still prompt you for a reboot.
AutoReboot
If this line is present (and uncommented) NetSwitcher will automatically (i.e. without user intervention) reboot after applying the setup. This is usually added in conjunction with the AutoApply directive.
IPAddress*
This is the IP address you want to set for the network adapter in the A.B.C.D notation. Be sure it is a legal TCP/IP address. Remember that each of the A, B, C, & D number must be between 0 and 255. If you set the address to 0.0.0.0, that tells the network adapter to get it ’s address from the host (i.e. server). This is most commonly used with the Dial-Up adapter running PPP (point-to-point protocol) or those network running a DHCP server.
(Tip for ADVANCED USERS: Windows 95 does support multihoming, which is assigning more than one TCP/IP address to a single network adapter. You can specify up to 3 IP addresses for NetSwitcher to assign to the seleted adapter. They must be separated by commas and there cannot be any spaces in the string. There must also be a one-to-one correspondence between the 1, 2, or 3 IP addresses specified and IPMask entries. So for example we can set IPAddress '192.168.0.1,192.168.0.2,192.168.0.3' but we must also set IPMask '255.255.255.0,255.255.255.0,255.255.255.0')
IPMask*
This is the Netmask to setup for the adapter. Please don’t guess what this should be. Ask your network administrator or ISP. It will often be 255.255.255.0 (Class C network address) but not always. If it’s wrong you could cause problems on your segment of the network.
DefaultGateway*
This is the IP address of your router or gateway machine. In your environment, you may not have or need one, so it might be blank. If you are inside a company and are trying to get out to the internet, you probably will have to set this. If you are using Dial-Up with PPP, you usually don’t have to set this.
NameServer
This is the IP address of your DNS nameserver or nameservers. There can be more than one but there don’t have to be any if you enter all of the hosts your want to talk to into your LMHOSTS file or just use their IP address. For a single nameserver it will just be an IP address like 123.1.2.3. For multiple, it will be a comma separated list (without spaces) like 123.1.2.3,123.2.3.4,123.4.5.6. If you don’t know the IP address of your nameserver, ask your network administrator or ISP.
HostName
This is your hostname but without your domain information. So if your PC is mypc.mycompany.com, HostName would be set to mypc.
Domain
This is your domain, but without your hostname. So if your PC is mypc.mycompany.com, Domain would be set to mycompany.com.
SearchList
This is the default domain which is appended to hostnames which do not have a domain name before trying to look them up in the DNS database. For example, if you have set SearchList to mycompany.com, then if you try to telnet to xyz, it will default to xyz.mycompany.com. This parameter is commonly used to keep you from having to type in the full domain name for your local hosts. There can be more than one domain in the SearchList, separate the different domain names with a comma.
LMHostFile
The file LMHOSTS is normally found in \WINDOWS\LMHOSTS and is where you can manually enter IP addresses of hosts which are not in the DNS database of your DNS server or if you don’t use a DNS server but don’t want to remember the IP addresses all the time. If you want to have a different LMHOSTS file for each setup, then you can change which one is used by setting this one to a different pathname. Be sure to use the full file system pathname for this parameter.
NameServer1 & NameServer2
These are used by the WINS configuration. I don’t use WINS, don’t know what it is or have any way of testing it but some have asked for this support. Use at your own peril! Please EMAIL me if I don’t have this right.
ScopeID
This is related to the WINS setup. Some sort of name goes here which allows your computer to “ see” other computers in the same scope.
EnableDNS
This is set to 1 to enable the DNS lookup for the specified nameserver and set to 0 to disable DNS lookups.
NodeType
If you configure and enable WINS, NodeType should be set to 8. Otherwise, set it to 1.
ComputerName*
This is the MS Windows networking name for this computer. It is normally set in the Control Panels>Networking>Identification menu.
Workgroup*
This is the MS Windows networking name for the WORKGROUP you are in. It is normally set in the Control Panels>Networking>Identification menu.
NTLogon*
This item has a value of either “YES” or “NO” and specifies whether Windows 95 is to attempt to logon to the specified Windows NT Domain. Note that this item is case-sensitive so “yes” will not enable this item.
NTDomain*
This is the name of the NT Domain which Windows 95 will attempt to login to if NTLogon is equal to “YES”.
DHCPWINS & NODHCPWINS*
These options specify whether or not to select the “Use DHCP for WINS Resolution” option. Only one of these should be set. If neither is present, then the existing state of this flag will remain.
IpxFrame*
This is the IPX/SPX protocol FrameType setting. The default for Win95 is "4" which is an automatic frame type detection. Some networks have trouble autodetecting and so this allows you to specify you desired value. Possible values, and their meaning are:
"0" - 802.3
"1" - 802.2
"2" - Ethernet II
Note that "3" is NOT used
"4" - Auto (this is the Win95 default)
"5" - Token Ring
"6" - Token Ring SNAP
RunCommand
This option allows you to tie in an external command to be run after you press the APPLY button. After NetSwitcher makes it’s changes, it will execute the specified command.