Operating Systems

Bluetooth Pairing for Dell Keyboard

The Bluetooth keyboard may become unpaired from the computer.  This can be hard to resolve as there is no pairing code available.

This issue was observed after running Windows Updates on Vista, but but it can happen for no apparent reason.

Remember the On Screen Keyboard in the accessibilities section of the start menu, it may help get some things done in the interim. (Start > Accessories > Ease of Access)

These steps have been seen to resolve the issue;

    • Rebooting the PC may be a first good step.
    • Run the Dell Setpoint utility
      • From the systray, or from Control Panel, Keyboard, SetPoint Settings tab
    • From the Tools tab, select the Bluetooth icon tab on the left
    • Click "Connect Device"
    • Double-click the Dell BT Keyboard icon
      • you may need to press the pairing button on the keyboard
      • if you're not seeing  the Dell BT Keyboard icon, rebooting may help cause it to seek to pair
    • This should provide the option to generate a pairing code
    • Generate the code, enter it on the keyboard, press enter


DOS & DOS Scripting Operating Systems

Robocopy to Copy Folders

There are numerous switches and options for Robocopy that are hard to get right if you're rushing into a task.

Here is a useful example:

robocopy src dest /MIR /R:3 /W:15 /REG /LOG:c:\temp\robocopy.log /NP /TEE /DCOPY:T /MT

/MIR = Copy the mirror structure

/R= Retry only # times.  This is important, the default is one million which effectively means that if there's one bad file in a huge batch, it will never complete.

/W= Wait time between retries.

/REG writes the the R and W settings to the registry as defaults

(Effectively, with the R, W and REG options I"m saying "If there's a problem copying a file it's probably a lost cause.  Try again if you must, but don't waste a lot of time on it.  And don't ask again about these options"'. )

/LOG = Write the results to a log file, I'll miss info if it scrolls out of the buffer.

/NP = don't display the percentage.  Benefits: it gives a visual indicator of progress on screen. Drawbacks: It clogs up the log file with a line for every report of progress, at 1 per every 0.1%.  Over a thousand log lines for every file is a bit much.

/TEE = Show the output on the screen as well as sending it to the log file.

/DCOPY:T = Copy folder timestamps

/MT[:n] = Multi-Threaded mode, where n indicates the number of threads to be used. By default, n is 8 when you use the /MT option, and can be any value from 1 to 128.


Operating Systems Web Server

Wamp Server

Wamp Server is an Open Source web server stack, installing all the components you'll need for running a typical web server on Windows.  Wamp is an acronym for Windows Apache MySQL PHP.

For those unfamiliar, Apache is the Web Server, MySQL is the Database server and PHP is a popular and well supported programming language for coding websites and database access.  See the Wampserver website for further information.

Wamp Server is an excellent and easy to use system for quickly installing a web server on a home computer or any other system.  Because the components (aside from Windows) are open source, there is nothing to buy and you really can install this for free.  It's an excellent choice for quickly installing a testing and development webserver on any Windows computer.


Operating Systems

Testing and Elevating Admin Privileges in Windows 7 / Windows 2008


Due to UAC , many processes, including many installations, must be run from an elevated privilege level, even when you are logged in as an administrator.

Testing for Privileges

The following code in an installation script will test to see if the script is operating

::Test whether script has Admin Privileges/is elevated
at > nul:
If "%errorlevel%"=="0" (
  echo You are Administrator
) else (
  echo You are NOT Administrator. Exiting...
  Ping > nul: 2>&1
  Exit /B 1

Elevating a Session

You can run any executable by right-clicking it and selecting Run as Administrator.  However, you may find that you want to simply elevate your session.  (Think before you do this, there's a reason they have UAC.)

The following process details how to elevate a session;

  • Log in as admin
  • Open an elevated CMD window
  • Right-Click on Command Prompt in the Start menu and click Run as Administrator.
  • Kill the explorer proccess from Task Manager or enter the following command at the elevated command prompt. (/F forcefully terminates the process and /IM represents the 'image name' of the process to be killed, i.e. explorer.exe )
    • taskkill /F /IM explorer.exe
    • In the elevated CMD window, start a new explorer process explorer.exe
    • Close the elevated CMD window
    • Since the explorer process is now running elevated, subsequent operations should not require elevation.

In fewer words:

Log in as admin
From an elevated command window enter the following 3 commands:

taskkill /IM explorer.exe /F


Operating Systems

DNS Tips

Some general help with DNS