Sunday, April 18, 2010

Use DiskPart to remove GPT partitions

The standard Windows XP GUI tools will not allow you to modify a disk which uses the GUID parition table (GPT) instead of the standard MBR. This is a particular problem if you have used an external disk in a Mac; for example, I used an external HDD as the TimeMachine backup device on a friend's MacBook. Now that she has her own external HDD, I wanted my disk back, but Windows appears not to recognise the disk.

To the rescue comes DiskPart (courtesy of pitumbo).

DISKPART> select disk N
DISKPART> clean

DiskPart itself has a range of useful options for managing and inspecting disks, partitions and volumes. For example:

Tuesday, February 02, 2010

Blogger to remove Publish via FTP

As I suspected some time ago, but at a much later time than I thought, Google is finally going to switch off the "Publish via FTP" option from Blogger (http://blogger-ftp.blogspot.com/2010/01/deprecating-ftp.html, http://blogger-ftp.blogspot.com/), causing much ranting on Twitter

The FTP feature was great, in that you got all the benefits of the Blogger editor interface, but all the files were published as flat files to a custom web server. Better still, you could cajole Blogger into saving the files as PHP, thereby providing a cunning integration with flat-HTML websites, without the use of a database or blogging software installed on the server.

Apparently, this caused Blogger a great deal of headache, particularly in resolving support incidents: only .5% of active blogs used FTP for publishing (although I bet all those were "real" blogs, rather than spam or SEO-drivers).

I think this means we'll need to install the blogging software on our servers, software such as WordPress (http://wordpress.org/). We need a mechanism which allows PHP scripts, so that the content can be embedded within the website itself, not hosted at some crummy http://blog.domain.com/ separate domain. This rules out the Google Custom Domain option.

Less than two months' notice is not great, but hopefully we should be able to improve on Blogger anyhow.

Verfiied by Visa Confirmed Dangerous

New research from the University of Cambridge supports the view that Verified by Visa is deeply flawed and unsafe. I first came across this mess of an implementation a while back, and the situation has only become worse since then:

the scheme has become a target for phishing, partly because inconsistent authentication methods can leave customers confused.

It's time to insist that Visa, MasterCard and other payment gateway providers take some responsibilty for this, and stop pushing risk onto the customer.

Tuesday, December 29, 2009

WMIC - command-line control of WMI functions

Before Windows PowerShell and all the flexibility (and complexity) that brings, there was WMIC, the command-line client for WMI.

WMIC works out of the box with Windows XP and later (including Server 2003 and Vista), and allows access to operations provided via WMI: "a powerful, user-friendly interface to the WMI namespace". Upon first use, the WMIC environment is installed:

C:\> WMIC

Please wait while WMIC is being installed...

Several tasks which normally feel very GUI-oriented, such as checking the battery status, are made very "command-line" with WMIC:

C:\> WMIC Path Win32_Battery Get BatteryStatus /Format:List

BatteryStatus=1

In this case, the batter is discharging. You can see the beginnings of PowerShell in the syntax and detailed status/operations available. Another useful command is useraccount, to return details of the user accounts on the system:

C:\> WMIC useraccount list brief
AccountType  Caption                  Domain     FullName       Name   SID
512          SKELTON-M\Administrator  SKELTON-M  Administrator         S-1-5-21-68**03330-*********-839**2115-500
512          SKELTON-M\Guest          SKELTON-M  Guest                 S-1-5-21-68**03330-*********-839**2115-501
...

Or how about terminating a specific process (notepad.exe) from the command-line? Here we go:

C:\> WMIC process where name='notepad.exe' call terminate

Executing (\\SKELTON-M\ROOT\CIMV2:Win32_Process.Handle="4652")->terminate()
Method execution successful.
Out Parameters:
instance of __PARAMETERS
{
        ReturnValue = 0;
};

It's helpful to install the WMI Administative Tools, so you can explore the WMI namespace and investgate the operations available to you via WMIC. For example, to determine the name of the time zone currently used by the system, use the TimeZone path:

C:\> WMIC Path Win32_TimeZone Get StandardName /Format:List

StandardName=GMT Standard Time

The time zone for my computer currently is "GMT Standard Time".

For simple operations which do not merit PowerShell scripts or installation, WMIC is a good choice.

Sunday, November 01, 2009

Favicon generator

Older IE browsers support only the ICO format for website icons, which is a pain, because very few tools support generation of ICO files.

One solution is http://www.favicon.co.uk/, which allows you to upload a JPG, GIF or PNG, and it will convert this into an ICO file for you.