Wednesday, September 18, 2013

Schedule a task to reset the network interface on "Startup" or "Return from Hibernation" events.

*Please note that this is for Windows 7.  The "netsh" syntax differs for Windows XP and other versions of windows.  You will have to adjust your batch file accordingly*
  1. Determine the names for your local and wireless connections.  The interface names may differ on your computer so you will need to use the name listed when you run the "ipconfig command":

  2. Create a text file that will reset you local and wireless connections.
    @ECHO OFF
    color 1f
    CLS
    ECHO Disabling network interfaces.
    netsh interface set interface "Local Area Connection" DISABLE
    netsh interface set interface "Wireless Network Connection" DISABLE
    ECHO Enabling network interfaces
    netsh interface set interface "Local Area Connection" ENABLE
    netsh interface set interface "Wireless Network Connection" ENABLE
    Name the file with a .cmd extension such as: "RepairNetwork.cmd"
  3. Create a scheduled task for this command with triggers on "Startup" and "Return from Hibernation".
    1. Task Action:
    2. Startup Trigger:
    3. Return from Hibernation:

Friday, June 14, 2013

Find the Master Browser on a Windows 7 machine.

This command will let you find the master browser on a Windows 7 machine.  Obviously this should  be run in a command window.

for /f "delims=\= " %C in ('net view ^| find "\\"') do @echo -Checking %C && @nbtstat -a %C | find "MSBROWSE"

The master browser(s) will be displayed like this:

-Checking SOMESERVERNAME
    ..__MSBROWSE__.<01>  GROUP       Registered


If you have a server acting as a browser and it's not supposed to, you may want to change the following registry settings:


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Browser]
"IsMasterBrowser"="False"
"MaintainServerList"="No"


You can find more information on Microsoft's website here: TechNet Specifying Browser Computers

*Note:  You may have to run this command more than once if a browser election is taking place.

*Note2:  If you came here because the other computers on the network are disappearing randomly, try disabling your "DNS Client" service and see if that helps.

*Note3:  If you are still having problems, see my post on disabling Bonjour.  It really seems to mess things up at times.