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

Disable GIF animations in Firefox and Internet Explorer

To perminantly block GIF animations in Firefox:

  1. In the Address Bar type:
    and press [Enter]
  2. In the Filter Bar type:
  3. Change the string value of image.animation_mode from normal to none

To perminantly block GIF animations in Internet Explorer:

  1. Click Tools (press the [Alt] key to reveal the menu bar or open Internet Options in the Control Panel)
    Select Options
  2. Click the Advance tab
  3. Uncheck the box in the group Multimeida next to Play animations in web pages
Disable GIF animations in Firefox and Internet Explorer

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

Install a DHCP server in Linux

To set up a DHCP server, start by download the latest version at the Internet Software Consortium; it is important that the latest version is used as it is the most secure and will be running on your server.

  1. Download the DHCP server (the current version can be found here):

    wget http://ftp.isc.org/isc/dhcp/dhcp-4.2.1-P1.tar.gz
  2. Untar the archive

    tar xzf ./dhcp-4.2.1-P1.tar.gz
  3. Move to the new directory containing the untared files:

    cd dhcp-4.2.1-P1
  4. Execute these commands to configure and make the source into executable binaries:

  5. All going well, switch to root and install the server:

    sudo make install

    You will be prompted for the root password and, if you entered it correctly, the new DHCP server will be installed

  6. Configure the server; start by copying the default configuration file from the installation directory into /etc:

    sudo cp server/dhcp.conf /etc
  7. Now edit the configuration file (I use nano however any text editor, such as vi, can be used):

    nano /etc/dhcp.conf
  8. My DHCP configuration is very simple, the entire file is:

    subnet netmask {
            option domain-name-servers; # This is the DNS server, usually your modem's IP
            option domain-name "home";           # DNS name, this line is optional
            option broadcast-address; # Useful for multicasting, e.g. VLC
            option subnet-mask;        # This is the default for 10.x.x.x networks
            option routers;             # This is your gateway, again usually your modem's IP
            range;          # IP range. The first computer to ask for an IP will
                                                 # be the last will be after which
                                                 # all IP addresses will be exausted (i.e. max 50 IPs)
  9. You can perminantly assign an IP address to a computer with the following additions:

            hardware ethernet 00:00:00:00:00:00;  # Replace with the machine's MAC address


How do I install DHCP on my Linux Server?

Install a DHCP server in Linux

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

How to disable FireFox’s built in antivirus scanning

In Windows Firefox automatically uses the local virus scanner, if installed, to scan any file it downloads. While this may provide extra safety, the real-time scanning functions of modern antivirus programs render this additional scanning unnecessary and causes delays, false positives and even freezes when downloading files – especially large ones.

To disable Firefox's automatic virus scanning perform the following steps:

  1. In the address bar type about:config
  2. In the filter bar (CTRL+F) type browser.download.manager.scanWhenDone
  3. Double click this entry to toggle it from the default true to false
  4. Close all open Firefox windows and restart to apply the change
How to disable FireFox’s built in antivirus scanning

Disable .DS_Store files on network shares

Apple's Mac OS X automatically creates a hidden file called .DS_store on any file system it encounters, including SMB (Windows) networks, similar to Windows' desktop.ini file.

To prevent its creation on network shares, follow these steps on the Apple computer:

  1. Open Terminal (/Applications/Utilities/Terminal or click the magnifying glass in the top right of the screen and type Terminal)
  2. Execute the following command
    defaults write com.apple.desktopservices DSDontWriteNetworkStores true
  3. Either restart the computer or log out and back in.

To disable .DS_store creation on network drives for all users see Apple's article.


Mac OS X v10.4 and later: How to prevent .DS_Store file creation over network connections


Disable .DS_Store files on network shares