1. Home
  2. Computing & Technology
  3. Delphi Programming
photo of Zarko Gajic

Zarko's Delphi Programming Blog

By Zarko Gajic, About.com Guide to Delphi Programming since 1998

Help! Lost USB Toolkit - Fancy Delphi Application Contest Entry #16

Monday February 18, 2008
in FDAC :: Help! Lost USB Toolkit "Omnia mea mecum porto" or "All that is mine I carry with me". Is all that located on a USB stick? What if you lost it? You hope someone will return it to you? But how will they know who the stick belons to?

An idea: create a simple application located on your USB, make it run as a default option when the stick is inserted. If the stick is found the application displays a message containing your address and a "please send me my stick" message.

This is the 16th entry to the Fancy Delphi Application Contest

Read the full article to find more about (+ download source code) Help! Lost USB Toolkit

When you download the application and test, rate it:

  1. Excellent
  2. Superb
  3. Good
  4. Average
  5. Poor
If you already voted, take a look at poll results.

Related:

Comments

February 18, 2008 at 3:20 pm
(1) Aldo says:

This isnt too much Delphi related for a DELPHI Application contest anyways

February 18, 2008 at 3:27 pm
(2) Zarko Gajic says:

Aldo, but this program IS written in Delphi - has a purpose and is 100% valid for FDA(C).

February 18, 2008 at 4:26 pm
(3) Aldo says:

LOLOL :(

NVM i saw just the autorun file.. and i was like WTH!!!

^^

February 20, 2008 at 3:55 pm
(4) R. v.d. Hulst says:

In some e-mail addresses a point (.) can exist in the part before the @ sign. This is the case in my e-mail address. For this reason ,’.’ should be deleted in line 79 positions 58,59,60 and 61.
Also the e-mail address can be at the end of the file causing EndIndex to be 1 too low. For this reason after line 91 an extra line should be inserted:
if EndIndex = Length(FileText) then Inc(EndIndex);
Finally the e-mail address can be followed by a new line instruction and the some text. For this reason at line 87 and position 37 should be inserted:
chr(10),chr(13),
To my opinion in the Autorun.inf file only open=HelpLostUSB.exe is needed.

The program runs excellent with one of my USB Sticks (USB 1), however for up till now unknown reasons the Autorun.inf file is ignored at the second one (USB 2.0). Both are from the same manufacturer and I am using Windows 98SE. After a few days I have the opportunity to see how they will react with Windows XP

February 20, 2008 at 5:31 pm
(5) Richard C Haven says:

Re 4. Very good points: I did not test robustly .

I added the whitespace characters to the first loop, and (after setting EndIndex = StartIndex above)changed the second loop to:

while EndIndex

February 25, 2008 at 8:33 am
(6) R. v.d. Hulst says:

Added to my previous comment the following:
I have tested the program with friends and on Windows XP computers. I myself have Windows 98SE.
Also my friends meet problems with retaining the correct e-mail address. Keeping in mind that an e-mail address is a string having no space in it and probably also no comma the retrieval of the correct address can be simplified by just checking for space, comma and new line instructions Chr(13) and Chr(10). This simplifies the program.
IsDotFound : Boolean; line 48 can be deleted.
Also deleted can be lines 84 and 88, and 91.
The checks in lines 80 and 87 should only be for;
chr(10), chr(13),’ ‘,’,’

I have a Windows 98 SE machine, for which the Autorun.inf file needs to contain only one line:
Open=HelpLostUSB.exe.
When a stick is inserted into the USB slot the Readme information is show directly.

On a Windows XP machine the introduction window “what to do” is coming up and the HelpLostUSB.exe has been selected. Only if the user clicks OK for that program he will get the “lost information”, otherwise the Lost information is ignored. Is their any possibility to avoid this introduction window?

Line 4 of the Autorun.inf file: label=Help! I’m Lost! changes the name of the USB stick in the window of Explorer and to my opinion this should not be done.

I could not find any effect of the last two lines in the Autorun.inf file; after being deleted the system works as before.

I could not find out for what reason one of my USB stick refuses to obey the Autorun.inf file. This is the case with Windows 98 as well as with Windows XP. In case of Windows XP the HelpLostUSB.exe is not selected when using the faulty stick, but HelpLostUSB.exe can be selected and opened. I have forwarded this problem to the manufacturer of the sticks, but thus far I have not got their answer.

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Explore Delphi Programming

More from About.com

  1. Home
  2. Computing & Technology
  3. Delphi Programming

©2008 About.com, a part of The New York Times Company.

All rights reserved.