Sunday, 8 April 2012

How to boot MHDD from USB Device

To boot famous disk diagnostic tool MHDD from USB thumb drive you'll need: 
1. Not supprisingly thumb drive you are willing to use as bootable (and are ready to format it).
2. A copy of Virtual Floppy Drive application.

a. So. First obtain a copy of Virtual Floppy Drive 
(We are making our bootable USB because we don't have real floppy drive, don't we? If you have physical floppy drive and spare diskette than you can skip this section and go straight to the b )
Unpack it in some folder and then run vhdwin.exe from it, go to driver tab and Start virtual floppy drive service.


Next go to 'Drive 0' tab and hit 'Open/Create'. Set media type to 3.5" 1.44MB and again hit create.


Now you have a virtual floppy in your virtual floppy drive to put bootable image of MHDD there. Btw mine floppy drive got "A:" disk letter, remember the one you got you will need it.

b. So let's put on our floppy a bootable image of MHDD somehow. To do this obtain "Last version of MHDD, self-extracting floppy image.". I got it following the google link returned for the query of "MHDD". Run downloaded file (mine was named "mhdd32ver4.6floppy.exe"). The summoned application has no options and looks like this:


So just hit 'Create Floppy' confirming overwriting of content of the floppy residing currently in a drive. Wow. Now we have a bootable image of MHDD but it's on our floppy, not on USB. 
c. Now we are to move it to the USB Thumb drive. To make this happen we need another app from HP called 'HP USB Disk Storage Format Tool'. It can be downloaded from Softpedia. After downloading run it and it will  present itself with single dialog. Select your USB Thumb drive as a device, FAT as file system, check 'Quick Format' and 'Create a DOS startup disk...' selecting floppy drive as a destination.


That will make our thumb drive bootable. But we still do not have MHDD on it. So the next step is just to copy entire contents of floppy drive to our new bootable USB drive (overwriting or not overwriting files). That's all. Now we can boot from our USB drive. 

d. So it's time to reboot and to command your bios to boot from USB media. 

Sadly but you have to make a few more moves to actually  run MHDD.

After boot you will be faced with Windows 98 (!) logo and then the following selection:


I select "With " (cause with is better than without, isn't it =)
Than there's beep and report of some failures. Don't mention and just press 'f' until you are faced with >D:\MHDD and a message that mhdd was successfully unpacked to D:\MHDD. You know what I'd say: "It's a shameless lie". To ensure run DIR command =)
So MHDD is not actually unpacked and we are to do it manually. So execute the following commands:

c:
cd mhdd
c:\pkunzip -e mhdd

Now we have really unpacked MHDD to c:\MHDD.
So it's time to type MHDD and hit enter. Voila!


Wednesday, 4 April 2012

Remarks bout bcb6 compiler

1. The destructors may not be called in stack unwinding if function inlining is enabled
2. BCB doesn't call _all_ destructors of local objects in case the temporary is initialized _within the parenthesis_ of hte if statement.

Friday, 30 March 2012

Scrobbling Vkontakte

Here you can download Last.fm scrobbler for Vkontakte social network.
http://code.google.com/p/vkontakte-scrobbler/issues/detail?id=3
(download the latest attachment from thread).
To run it you must be using Firefox with installed Greasemonkey Add-on or Opera.
To install downloaded userscript copy it's path then paste it into FF's address bar and confirm installation.

Sunday, 2 October 2011

Useful script for greping all files excluding those that match specific pattern

grep -Pn 'Win_' `ls -1 *.ahk | grep -vPi 'Win|recall.*ahk' | awk '{printf $1 " "}'`

Saturday, 9 October 2010

Usefull windows batch script to convert all files in directory using ImageMagic

This little snippet desaturates, resizes to half and converts to png all files in given directory using ImageMagic.
F:\Canon\Textbook>for %file in (.\*) do convert %file -resize 50% -modulate 100,0 %file.png
Make sure that path to ImageMagic binaries is in your PATH environment variable.

Monday, 13 September 2010

Issues of Upgrading memory on DELL Inspiron 640m

Recently my relative asked me to upgrade memory on his DELL Inspiron 640m notebook.
Gladly an offer of compatible RAM modules can be easily found on ebay.
The specs of compatible RAM are DDR2-667 PC2-5300 200 pins SODIMM and DDR2-533 PC2-4200 200 pins SODIMM (2x1Gb is maximum for Inspiron 640m).
Naturally I chose the fastest one.
New Kingstone modules came after 2 weeks of waiting, and THAT IS very reasonable time to deliver from Hong-Kong to Moscow, Russia.
It took time to plug in 2 modules, cause Module A is not so easily replaced as Module B. The dock of Modules B is situated under the bottom of the laptop. To reach Module A one should remove hinge cover and the keyboard (btw some samsung laptops have both modules under the keyboard).
The disappointment came after both modules were installed.
Memory speed showed as 533 both in Windows and in Bios setup.
After some googling (you see it's hard not to find needed info on the net today) the answer came out.
This laptop model is shipped with one of two processor types. The fastest one supports 667Mhz RAM and the other supports only 533Mhz. Pity that my relative had the second one.
So if you ever have to choose between compatible RAMs for your laptop first check if your CPU really supports desired RAM speed.

Friday, 3 September 2010

CB Compiler speed up and Total Commander as Horisontal Diff Tool

Today's post is about application of some tools.

First one is patching of Borland C++ Builder 6 with Andreas Hausladen's C++ Compiler Enhancements. Andreas has various patches and fixes for Borland, Codegear and Embarcadero products on his personal page. This particular one speeds up compilation of C++ projects by the direct call of the compiler with appropriate arguments. Original call to the compiler that the IDE makes for some reason takes much longer than the direct call to bcc32 from command line. Patching forces IDE to use the direct call. In addition this patch makes it easier to make use of precompiled headers, which can speed up compilation even further.
So it's definately recomended to install this patch.
Older versions (5 and 6) of BCB are not officially supporthed, though it's still possible to patch these IDEs. As I understand there's just no more guarantee that everything will go fine with BCB 5 and 6.
Btw another option to speed up compilation is to use RAM-disks, as suggests Kudzu. I have not tried it by myself, but hope to put my hands on it and cover results here.

Anoter useful applience is using of Total Commander to compare files in the horisontal split view.
When faced the need to compare two files with long lines, I started to search the web for diff tool that offered horisontal split. In fact I searched for some free tool. To my surprise according to Wiki there were only a few such tools. Namely:
  • ExamDiff Pro (shareware)
  • jEdit (java editor)
  • Ediff (part of emacs)
  • and... Total Commander (not free but an already licensed one)
It took only half a minute to find Comparison command in TC's menu, to select files and to switch to the horisontal view. Yet another appliance of the great file manager.