Why and how to disable Bonjour

Bonjour is Apple's auto-network discovery protocol that, among other things, allows iTunes to discover other iTunes libraries on the same network and for devices such as the iPod/Phone/Pad and Apple TV to discover each other and share their libraries or remote control each other. However, if you don't use any of these functions it is yet another service that:

  • contributes to your bootup time
  • consumes RAM and CPU resources
  • increases the attackable surface area of your computer, posing a potential security risk

Below are two methods to disable it:

Method 1: Remove Bonjour

  1. Open Command Prompt (Under Accessories in the Start Menu)
  2. Enter and execute the following command:

    "C:\Program Files\Bonjour\mDNSResponder.exe" -remove
    move "C:\Program Files\Bonjour\msdnsNSP.dll" "C:\Program Files\Bonjour\msdnsNSP.old"

    Note under 64 bit versions of windows this will be:

    "C:\Program Files (x86)\Bonjour\mDNSResponder.exe" -remove
    move "C:\Program Files (x86)\Bonjour\msdnsNSP.dll" "C:\Program Files (x86)\Bonjour\msdnsNSP.old"
  3. Reboot
  4. Delete the Bonjour folder

Method 2: Disable the Bonjour service

  1. Open the Start Menu, right-click Computer and select Manage
  2. In Computer Management select Services and Applications and then select Services
  3. Right-click Bonjour Service and select Properties
  4. Change Startup type from Automatic to Disabled
  5. If the Service status is Started click the Stop button
  6. Click OK
Why and how to disable Bonjour

Disable Num Lock

This registry edit controls whether Numlock is enabled or disabled when you login to Windows.

  1. Launch Registry Editor
    (Start > Search: regedit > press [Enter])
  2. Go to the registry key:

    HKEY_USERS\.Default\Control Panel\Keyboard
  3. Change the value of InitialKeyboardIndicators:
    Set it to 0 to set NumLock to OFF
    Set it to 2 to set NumLock to ON


Enable/Disable Numlock at Login or Startup

Disable Num Lock

Allow Windows PE PXE boot from a Linux server

There is a major problem in booting Windows via PXE from a Linux server: Linux's is case sensitive but Window's isn't. So text.txt, Text.txt, test.TXT and tExt.txt are four different files in Linux whereas under Windows there can only be one file or folder in a location with the characters T-E-X-T-.-T-X-T. Additionally windows uses '\' whereas Linux uses '/'. To compensate for this, TFTPD can be configured to translate between the two.

To allow windows to boot from a Linux TFTP server:

  1. Create a file called tftp.map in the folder you have specified as the TFTP root (the default is /tftpboot)
  2. Add the following lines to tftp.map using your favorite text editor:
    rg      \\      /
    r       bootmgr.exe     /Boot/bootmgr.exe
    r       /boot/          /Boot/



Allow Windows PE PXE boot from a Linux server

Clear the Offline Files cache

Over time small problems tend to creep into any system that depends on synchronising data in multiple sources and Windows' Offline Files is no exception. It may also be that Windows decided, in its infinite wisdom, that it should make a network share available offline or more simply you no longer want any folders available offline and are having difficulty to clear the cache.

Follow these steps to reset Offline Files; this will clear the cache:

Note make sure that files are synchronized before you add this registry entry. Otherwise, unsynchronised changes will be lost.

  1. Click Start, type regedit in the Start Search box and then press [Enter]
    If you are prompted for an administrator password or confirmation, type the password, or click Continue
  2. Locate the following registry subkey and then right-click it:
  3. Point to New, and then click Key.
  4. Type Parameters in the box.
  5. Right-click Parameters, point to New, and then click DWORD (32-bit) Value.
  6. Type FormatDatabase, and then press ENTER.
  7. Right-click FormatDatabase, and then click Modify.
  8. In the Value data box, type 1, and then click OK.
  9. Exit Registry Editor, and then restart the computer.



Clear the Offline Files cache

How to disable low memory warnings and the advantages of removing the page file

The page file, virtual memory, swap space – it has many names – is where the operating system places currently running programs and data when it either does not have enough RAM to store them in or it thinks they won't be used in the near future, so it preemptively frees RAM for new programs and data to be stored there.

With RAM continually getting cheaper per gigabyte 4, 6 and 8 Gb of RAM in a new desktop is not uncommon although more than 4 Gb in a notebook is still unusual. As such the need for extra virtual RAM stored on the much slower hard drive (or USB flash if using Windows Vista's or 7's ReadyBoost function) is increasingly unnecessary. I personally disable the page file as soon as I can get at least 4 Gb of RAM in a system for these reasons:

  • it frees up space on the hard drive that would otherwise be occupied by the page file
  • it reduces fragmentation on the hard drive caused by a growing and shrinking page file
  • all programs and data are always accessible in the fastest location – RAM. Windows has a tendency to move data to virtual memory even when there are still vast amounts of free RAM available
  • it speeds up reads and writes to the hard drive as it does not also have to cope with Windows writing out chunks of RAM to it while it is fetching or writing other data
  • it is essential if you are using a SSD as your sole means of permanent storage as the thrashing virtual memory gives will soon cause deterioration to the drive, due to the limited number of writes solid-state memory can withstand

Virtual memory was created for a reason however and there are disadvantages to disabling it. The most obvious one is that the number of programs the system can simultaneously support is reduced; on a 4 Gb Windows 7 system do not expected to run Photoshop, Dreamweaver and several browser tabs at once without running into trouble. The first trouble you will run into, under Windows 7 and possibly Vista is constant warnings when the system is using more than 80% of RAM.

Image source: http://blogs.technet.com/b/markrussinovich Pushing the Limits of Windows: Virtual Memory

Thankfully these can be disabled. Consider this: 80% usage for a 1 Gb system is 800 Mb, with only 200 Mb remaining, so warning the user that in 200 Mb usage the system will crash seems a good idea. However, with a 8 Gb system at 80% usage there is still 2 Gb remaining and typical usage may hover at 6.5 Gb, well within safety but the user will still be plagued with, in context, meaningless warnings.

To disable low memory warnings, follow these steps:

  1. We need to prevent the Diagnostics service from loading RADAR, which consists of 2 DLL files, radardt.dll and radarrs.dll
    Run Registry editor (Press [Windows Key] + R to launch the Run dialogue box, type regedit and click OK)
  2. Go to:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\WDI\DiagnosticModules\{5EE64AFB-398D-4edb-AF71-3B830219ABF7}
  3. Right click the key and select Permissions
  4. Click the Advanced button
  5. Click the Owner tab and then the Other users or groups… button
  6. In the Enter the object name to select text area, enter administrators or your current user name and click OK repeatedly until returning back to the Registry Editor
  7. Repeat steps 3 – 6 for:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\WDI\DiagnosticModules\{45DE1EA9-10BC-4f96-9B21-4B6B83DBF476}

References and further reading

How to alter threshold low memory warning

Pushing the Limits of Windows: Virtual Memory

How to disable low memory warnings and the advantages of removing the page file