Sunday, 24 January 2010

Legacy commands

Don't you hate it when you come across really powerful quick ways of doing things, just when the OS they apply to is taking its last gasp and they are calling it "Legacy" already? (although I feel XP will be around for another 10 years!)

For example the control command in XP:

Now I have used it many a time, but only in the sense of overcoming XP Home's User Accounts limitation:
 control userpasswords2

which, by the way,  I can NEVER remember :)

Here are some more to add to your quick typing skills...

(thanks to http://msdn.microsoft.com/en-us/library/cc144191%28VS.85%29.aspx?ppud=4) or to be honest, google's search ;)

Legacy Control Panel Commands


When you use the WinExec function, the system can recognize special Control Panel commands. These commands predate Windows Vista.





































control.exe desktopLaunches the Display Properties window.
Note Starter and Basic Editions do not support this command.
control.exe colorLaunches the Display Properties window with the Appearance tab preselected.
control.exe date/timeLaunches the Date and Time Properties window.
control.exe internationalLaunches the Regional and Language Options window.
control.exe mouseLaunches the Mouse Properties window.
control.exe keyboardLaunches the Keyboard Properties window.
control.exe printersDisplays the Printers and Faxes folder.
control.exe fontsDisplays the Fonts folder.

For Windows 2000 and later systems:





































control.exe foldersLaunches the Folder Options window.
control.exe netwareLaunches the Novell NetWare window (if installed).
control.exe telephonyLaunches the Phone and Modem Options window.
control.exe admintoolsDisplays the Administrative Tools folder.
control.exe schedtasksDisplays the Scheduled Tasks folder.
control.exe netconnectionsDisplays the Network Connections folder.
control.exe infraredLaunches the Infrared Monitor window (if installed).
control.exe userpasswordsLaunches the User Accounts window.

Wednesday, 6 January 2010

NTFS, FAT FAT32 and large harddrives.

PROBLEM: connect a USB drive to a device that prefers FAT32 or FAT (and not NTFS).
Sub-PROBLEM: Windows cannot go bigger than 32GB using FAT32.
The possible solutions are copiously stated here: http://www.online-tech-tips.com/computer-tips/formatting-external-hard-drive-to-fat-32/, but I foundthe command line provided by http://www.ridgecrop.demon.co.uk/index.htm?fat32format.htm absolutley instantaneous.
Had I a Paypal account I would even have donated :)

Here's how easy it was.

Download and unzip
C:\>cd fat32f

C:\fat32f>dir
Volume in drive C has no label.
Volume Serial Number is 5F1F-5DF5

Directory of C:\fat32f

06/01/2010  09:15 p.m.    <DIR>          .
06/01/2010  09:15 p.m.    <DIR>          ..
02/03/2009  11:47 p.m.            49,233 fat32format.exe
1 File(s)         49,233 bytes
2 Dir(s)  21,392,437,248 bytes free

C:\fat32f>fat32format g:
Warning ALL data on drive 'g' will be lost irretrievably, are you sure
(y/n) :y
Size : 40GB 78170242 sectors
512 Bytes Per Sector, Cluster size 32768 bytes
Volume ID is 1ce9:3957
32 Reserved Sectors, 9540 Sectors per FAT, 2 fats
1221111 Total clusters
1221110 Free Clusters
Formatting drive g:...
Clearing out 19176 sectors for Reserved sectors, fats and root cluster...
Wrote 9818112 bytes in 0.49 seconds, 18.94 Megabytes/sec
Initialising reserved sectors and FATs...
Done
C:\fat32f>

Wednesday, 23 December 2009

Love my Netbook

Netbooks have been around for a couple of years now and I have an eeePC 901. I have just started thinking about how much it has changed the way that I work.

I should say that my eeepc runs eeebuntu not xp which came with it. This is an Ubuntu distribution that is made for the eeepc and it work flawlesly. Super quick to boot and hasn't slowed down over time.

I used to have a full sized laptop that went everywhere with me. It had about an hour's battery life so needed to be plugged in to actually get any work done.

I now carry my eeepc around in my satchel as a matter of course. It is solid state so there is no HDD. If I drop my bag the netbook is fine. At a pinch I get 5 hours of work out of it which is enough for emergencies in my experience. If I am at a customer site for an extended period I either borrow an LCD, keyboard and mouse or bring my own. Then it is just like using a desktop. The eeeBuntu OS connects through my nokia 6600 slide to get the internet. I can work anywhere.

I still use my desktop for heavy development work but the old laptop has been seconded by my kids cause I never use it.

The key to the success of my netbook I think is the fact that it has no HDD and can handle the knocks. It is always with me and because of that I am always using it.

Wednesday, 16 December 2009

Personal SSL Certs PHP Curl

Needed to connect to a gateway that used personal pkcs12 (p12) SSL certificates and could not find any decent docs online. The whole SSL thing can be confusing at the best of times so I thought I would note down my experience.

PHP does not like pkcs12 certificates so you need to turn them into pem

openssl pkcs12 -in cert-they-gave-you.p12 -out key.pem -nocerts

openssl pkcs12 -in cert-they-gave-you.p12 -out cert.pem -clcerts -nokeys

If they gave you a password and one is requested here use that.

test at command line with

curl --cert cert.pem --key key.pem https://url-to-service

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://url-to-service');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_SSLCERT, getcwd().'/certs/cert.pem');
curl_setopt($ch, CURLOPT_SSLCERTPASSWD, 'password');
curl_setopt($ch, CURLOPT_SSLKEYTYPE, 'PEM');
curl_setopt($ch, CURLOPT_SSLKEY, getcwd().'/certs/key.pem');


/**

Word press will not allow me to post the execution command snippet so you need to look it up
**/
echo $result;
curl_close($ch);



PHP 5.2.3
cURL Information libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.10
Ubuntu 9.04

Tuesday, 15 December 2009

Skype Video on Linux

I recently set up an Ubuntu 9.10 machine for a customer that wanted to use it for Skype, Web and Email. In my experience Ubuntu is a great desktop in these instances.

This time however I hit a real speed bump with the Video in Skype. Every time the user tried to initiate a Video call Skype would close. This is strange because I have used it before with no problem.

The solution is to turn off video calls by default in the Skype settings, wait for the other person to initiate a video call, click on the video camera icon at the bottom of the picture, set the screen to double size and then turn on your video through the same menu. Not ideal I agree but good enough.

Thursday, 3 December 2009

Email on your phone - should you make the jump?

If you thought Crackberrys were addictive and that the novelty would wear off.. well think again.
Now that the rest of us can also have some too

But if it to become something as normal as having your phone with you, then it must be

easy


reliable


not run your battery down!



Applets for the mass market produced by such heavyweights as Nokia or Google, and used by millions, are certain to be easy to use, and as reliable as the network that carries them.

The problem is that the push technology they are based on means that the signal is on a lot more than the occasional call or text. And my experience is with the battery lasting less than half a day!

So getting used to them is no problem, but

Not that the email is always tightly integrated into the other aspects of the phone, which for me is the main criterion for choosing which method to use.

For the record I am on the New Zealand Telecom XT network and have a Nokia 6120 Classic (which has the  Symbiam60 operating system).  It appears that Symbian40 does not allow some of these apps to be used..

There are several options - three amongst which I have tried
- Google's own app (m.google.com.mail)
- Mail for Exchange
- Nokia's Messaging

Google's app whilst looking good, surprisingly, didn't integrate well with the phone's contacts list, instead presenting the txt interface each time an address is typed in. Most irritating!

The Nokia app, however acts in an much more Google-like way in the address line - suggesting possible matches in a drop-down as you type the first letter or three.

The other key criterion was to have gmail's contacts list seamless with the phone's. This was best accomplished using Mail for Exchange. At time of writing, contacts, tasks and email can be synched to gmail, so this is another good option, and it can be set to check periodically, say every 15 minutes is probably enough and will make the battery last more than just a day.

The Nokia app redeems itself by allowing scheduling of a download window. So it easy to be checking email only during your preferred work hours, and weekdays. BUT when on, it seems to be always on... thus my battery issues.

Be warned however, that the Nokia app appears to be in beta, or given away free for the time being.. The beta was supposed to have been pulled at the end of September - yet it is still going strong two months later.. I could find no more info on what plans are available - suffice to say that the only plan available is still the  "Nokia Messaging trial". http://e71bynokia.blogspot.com/2009/09/nokia-messaging-trial-ending-this.html

Well, you can't have it all, I suppose.

SIDENOTE: Tasks is not yet synced with any of these methods - but is possible with a £5.99 plan at http://www.goosync.com/About.aspx



Access Details

Google's own applet:
To download the app, point your mobile device's browser to http://m.google.com/mail.

Mail for Exchange can be freely obtained here

http://europe.nokia.com/get-support-and-software/download-software/mail-for-exchange

Download Nokia Messaging software can be done by regisering a Nokia account, and getting a link sent by text message sent to your phone here https://netac9.vie.hosting.nokia.com/account/getSoftwareAfterLoginUI.action

Alternativley, a direct download can be started by browsing from the phone as the instructions below indicate.

If you're having trouble receiving the text message with the Nokia Messaging software, you can use the web browser on your phone to directly download the software.


1 On your phone's web browser, go to: email.nokia.com


2 Select the button to download the Nokia Messaging software.


3 Follow the instructions on the phone to download and install the software


4 Enter the email address and password of your Nokia Messaging account to log in and start using the service.

Wednesday, 2 December 2009

Humility in IT

It's nice once in a while to be pleasantry surprised by an error message that actually apologises for the inconvenience - and means it (and offers a couple of useful options to try - other than just the choice of OK or Cancel ! )

[caption id="attachment_51" align="alignnone" width="659" caption="Firefox could not restore a previous session - and was actually honestly sorry.."]Firefox could not restore a previous session - and was actually honestly sorry..[/caption]