>When doing a demonstration for an application how long should it be?
>
>Considering that I don't want to lose the interest of the person getting the demo.
Show the main features as short as makes sense to you, and promise to go into details if anyone wants to hear them - in the end, when they've got the whole picture. If there are any questions (and if your audience is small enough, there would be - it largely depends on the setting) try to answer quickly and thoroughly and to the point. This is where you may need to measure the curiosity of the one who asked the question against the indifference of the others (are they really indifferent?) so to know how deailed the answer needs to be. Again, you can always promise more details after the official part, in the Q&A section. The trick is that the important but disinterested people have a carte blanche to leave then, and you're left alone with those who would actually use your software.
Beyond this point, it's up to you to win their confidence in your app, and it all may be in vain, because you never know whether those who will decide will ever ask for their opinion :).