I am currenlt only concerned with class C networks. I was thinking if we could read the registry or do an IPconfig to a text file where by reading the default gateway and subnet mask we could determine from those two pieces of information what the new default gateway should be. we have the following masks 255.255.255.0 255.255.255.128 255.255.255.192 255.255.255.224 these are the current subnet masks we use on our class C networks. I have about 600 machines on varies subnets maybe like 200 subnets which need to be modified to comply like I stated in the orginal post.