Change Window’s CMD to behave more like PuTTY

Having used both the Windows command line and then used PuTTY to control Linux machines, I miss the simple copy and paste functions PuTTY offers however these are already built into CMD!

Simply open a command prompt, click the C:\_ icon in the top-right and select Properites… In the Options Tab, in the Edit Options group, tick the Quick Edit Mode and Insert Mode check boxes.

There you have it, now selections in the command prompt will automatically be copied to the clipboard and right-clicks will perform the paste operation alla PuTTY.

Source

http://www.techspot.com/guides/311-paste-cmd-using-ctrl-v/

Change Window’s CMD to behave more like PuTTY

How to create a unique TeamViewer ID after imaging

If you include TeamViewer as part of your system image or clone an existing computer with TeamViewer installed, the newly set-up computer will have the same TeamViewer ID as the source computer however each computer needs its own unique ID to work.

To fix, open regedit (Start > Run OR WinKey+R, enter 'regedit' and hit <enter> or press 'ok') and delete two registry keys: ClientIC and ClientID which can be found at:

64 bit Windows

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TeamViewer\VersionX

32 bit Windows

HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer\VersionX

where 'X' is the version of TeamViewer

Note that this will not work on the source computer as the ID is calculated based on the hardware of the computer, therefore if this procedure is carried out on the source machine, it will just recreate the same ID.

Source

http://eatrocks.com/?p=166

How to create a unique TeamViewer ID after imaging

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

References

Enable/Disable Numlock at Login or Startup
http://www.technipages.com/enabledisable-numlock-at-login-or-startup.html

Disable Num Lock

Disable GIF animations in Firefox and Internet Explorer

To perminantly block GIF animations in Firefox:

  1. In the Address Bar type:
    about:config
    and press [Enter]
  2. In the Filter Bar type:
    image.animation_mode
  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/
    

References

http://www.msfn.org/board/topic/142879-need-help-troubleshooting-booting-winpe-30-with-pxe

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:

    ./configure
    make
  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 10.0.0.0 netmask 255.0.0.0 {
            next-server 10.0.0.1;
            option domain-name-servers 10.0.0.2; # This is the DNS server, usually your modem's IP
            option domain-name "home";           # DNS name, this line is optional
            option broadcast-address 10.0.0.255; # Useful for multicasting, e.g. VLC
            option subnet-mask 255.0.0.0;        # This is the default for 10.x.x.x networks
            option routers 10.0.0.2;             # This is your gateway, again usually your modem's IP
            range 10.0.0.50 10.0.0.100;          # IP range. The first computer to ask for an IP will
                                                 # be 10.0.0.50 the last will be 10.0.0.100 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:

    host COMPUTERNAME {
            hardware ethernet 00:00:00:00:00:00;  # Replace with the machine's MAC address
            fixed-address 10.0.0.10;
    }
    

References

How do I install DHCP on my Linux Server?
http://www.askdavetaylor.com/how_do_i_install_dhcp_on_my_linux_server.html

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:
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\CSC
  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.

References

http://support.microsoft.com/kb/942974/

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
http://forum.xcpus.com/software/13082-how-alter-threshold-low-memory-warning-2.html

Pushing the Limits of Windows: Virtual Memory
http://blogs.technet.com/b/markrussinovich/archive/2008/11/17/3155406.aspx?PageIndex=4

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