msi-Installer created with Visual Studio and the RemovePreviousVersions-Option

Tags: , ,
1 Comment »

[Edit: this seems to be solved in Visual Studio 2008. See this article]

In theory if you create a setup project within Visual Studio, you can set the RemovePreviousVersions to force the created setup to uninstall all previous versions of the same software already install on the target computer. This is a very useful option, but it does not work under all circumstances. But before I go into the problems a brief overview how it should work:

Besides the RemovePreviousVersions flag there are two further properties: UpgradeCode and ProductCode. The UpgradeCode must be the same for all setup projects (that is for the old versions and for the new version). The installer uses this UpgradeCode to detect an older version of the software. The ProductCode must be different for every version, this is uses by the installer to detect different versions of the same software . If you change the Version of an installer Visual Studio creates a new ProductCode.

This works the way described here in the same way described in the product documentation as long as you do not use a Version number below 1.0. If you name your beta and prerelease version something like 0.5 the installer does not recognize an previous version and will not uninstall it, but installs the new version side by side which can be a problem for you installation e.g. if it will be installed in the same directory.

Unfortunately this seem to be a known issue since 2004 or earlier and is not fixed in Visual Studio 2005. The installer looks only for previous Versions greater or equal 1.0 but not for versions less than 1.0.

But there is a workaround. You have to patch the MinVersion in the created msi-file with a tool called orca.exe.

  1. Download the Windows Platform SDK – about 400 MB
  2. Install it – Full install is about 1 GB but you only need the MSI-SDK parts, so choose the custom installation.
  3. In the directory of the SDK you will find an orca.msi – install it
  4. Start the orca.exe and open your created msi
  5. Got the Upgrade-Table
  6. Look for the 1.0.0.0 in the VersionMin-field and change it to somethink like 0.1.0.0
  7. Save the changes to the msi

iTunes, iPod und last.fm

Tags: ,
No Comments »

Wie scrobbt man Songs aus iTunes und dem iPod nach last.fm?
Ich habe mich etwas umgeschaut und bisher keine zufriedenstellende Lösung für mich gefunden.

Der orginal last.fm Player mit iPod und iTunes Plugin
http://www.lastfm.de/download/
Ist eine nette Software, die sich mit iTunes startet. Leider läuft permanent im Hintergrund in Helper der 10 MB RAM braucht. Der Player benötigt weitere 15 MB, ist aber sehr hübsch, vor dem übertragen von Songs es iPods kann man einige Songs ausschließen. Außerdem werden sehr gute Informationen zu dem gerade gespielten Song angezeigt.
Leider funktioniert das scrobben vom iPod nur wenn dieser auf automatisch synchronisieren steht (und das tut er bei mir nicht).
Unter Vista sollte man die Beta Version verwenden, da diese nicht bei jedem iTunes start nach Admin rechten für den Player fragt (Stichwort UAC):

iScrobbler For Windows
http://xurble.org/projects/iScrobbler
Habe ich diesmal nicht getestet, da dieses Plugin eh nicht mit dem iPod umgehen kann, der Vorteil ist, dass es keine riesige Software ist, die ständig läuft, sondern nur ein kleines Plugin in iTuens.

jscrob2 – iTunes plug-in w/ iPod sync support & real-time submissions
http://www.lastfm.de/forum/827/_/47398/1
Dies wäre mein Favorit, es ist wie iScrobbler ein leichtgewichtiges Plugin für iTunes und kann auch vom iPod scrobben. Allerdings auch nur wenn man automatisch mit dem iPod synchronisiert. Allerdings geht es hier anscheinend anders vor als der last.fm Player. Es betrachtet die Playlist „Recently Played“ in iTunes. Man muss eben sorgen, dass die auf dem iPod gespielten Songs hierlanden. Dies tun sie aber nur, wenn man ihn mit iTunes synct. Dies kann man aber auch erreichen, indem man nur spezielle Playlists abgleicht. Müsste sehr gut funktionieren, aber leider auch nicht für mich, da die Musik, die ich höre, gar nicht in meinem normalem iTunes enthalten ist.
Im Forum ist sehr genau erklärt, wie man die Playlist anlegt usw.

iSproggler
http://www.lastfm.de/group/iSproggler
Die s scheint die größte und am meisten verbreitetste Software zu sein, was ich allerdings nicht verstehen kann. Sie belegt permanent 40 MB Ram auch wenn man gar kein iTunes benutzt, was ich selbst bei 2 GB RAM als sehr unnötig erachte. Außerdem registriert sie sich bei iTunes, so dass dieses immer einen Fehlermeldung beim beenden ausgibt, weil noch einen andere Anwendung verbunden ist. Das ist auch sehr nervig.
Zu allem Überfluss findet man übrigens nirgendwo einen Downloadlink. Dazu muss man ins iSproggler Forum gehen und das darf man erst wenn man der last.fm Gruppe beigetreten ist – schlechtes Marketing!

Ich habe leider keine Möglichkeit gefunden, die Songs, die ich auf dem iPod höre (manuelles Pflegen der Musik) zu scrobben.

Windows shell32.dll SHFileOperation marshalling and hNameMappings

Tags:
2 Comments »

For my Software PhotoTagStudio I implemented a new feature to copy jpg-files from a memory card to the disk. I wanted to use that fancy Windows XP explorer copy dialog with the papers flying from one folder to another. And where I get the (more or less accurate) time estimation for free.

Searching the web I found the shell32.dll and the SHFileOperation function. This function does exactly what I need and on www.codeproject.com you can find a great article by arikp on how to address system32.dll from .net. arikp included sourcecode so you find everything you need to call the system32.dll functions from .net. Unfortunately two little features didn’t not work as expected:

hNameMappings is rarely used and can help only if I’m interesting in the new names the user had to give during the operation…

(but did not work in the ShellApi.cs)

…and finally lpszProgressTitle, If we set the flag FOF_SIMPLEPROGRESS, the progress dialog box does not present the file names and is supposed to present the text of this parameter. When I test this function I couldn’t get this parameter to show, it didn’t show the file names with the SIMPLEPROGRESS flag but it did not show the title parameter. What can I say, strange.

(did not work as well)

But I have to know the new names and thus had to get the NameMappings-thing working all by myself (I could not find a solution anywhere in the web). So I asked a good friend of mine, Wolfram Bernhardt, who subsequently did most of the following work:

He found a problem in the SHFILEOPSTRUCT:

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SHFILEOPSTRUCT
{
    public IntPtr hwnd;
    public UInt32 wFunc;
    public IntPtr pFrom;
    public IntPtr pTo;
    public UInt16 fFlags;
    public Int32 fAnyOperationsAborted;
    public IntPtr hNameMappings;
    [MarshalAs(UnmanagedType.LPWStr)]
    public String lpszProgressTitle;
}

When marshalling this from .net to unsafe/native each element of the struct is stored at an address that is an multiple of 4. (This is the default for .net on Win32 for performance reasons). This leads to some unused bytes – i.e. fFlags is only 16 bit width and the next parameter should not leave a space of two byte.

The functions of shell32.dll are old fashion and do not waste any space. So they read wrong values after fFlags. The fAnyOperationsAborted wasn’t harmed that much and it’s value wasn’t checked too carefully in my application. But the hNameMappings-Pointer went totally wrong.

To change this behaviour you just have to add the Pack=2 parameter to the attribute:
[StructLayout(LayoutKind.Sequential, Pack = 2, CharSet = CharSet.Unicode)]

After this little change hNameMappings is marshalled back correctly and points to a mapping-structue. As a “side-effect” the lpszProgressTitle is now shown as expected – at least on Win XP, Vista seems to ignore this string. Obviously MS has changed this function of shell32.dll. But the more important functions work as desired.

To get the new filenames you have to set the Flags FOF_WANTMAPPINGHANDLE and FOF_RENAMEONCOLLISION. The latter allows the function to (automatically) rename files during copying. If a filename already exists, the new copy is renamed to something like “Copy of [filename]”. On a Windows Vista machine you don’t need the FOF_RENAMEONCOLLISION flag, because the user can choose the new option “Keep both the original file and the copyâ€? in the dialog that asks to override existing files. In both cases the hNameMappings is filled with a pointer to a list of Mapping objects that contain the original and the new filenames.

To get the list from the hNameMappings Pointer you have to implement two more structs and Wolfram did it, too. He added a new property NameMappings to the ShellFileOperation Class. (For details see the source code of the changes ShellLib.)

With the following download we provide an updated Version of the ShellLib with the described changes. For more information please refer to the original article on The Code Project and take a look on the demo code over there.

The enhanced ShellLib Code

Moving Thunderbird and Firefox profile to another directory on windows

Tags: , , ,
No Comments »

Mozilla Firefox and Thunderbird store there user data (call profile) in a directory like C:\Users\ Benjamin\ AppData\ Roaming\ Thunderbird\ Profiles\8wdolvkx.default on the hard disk your windows is installed. But many users want to move this directory to another location (e.g. to another disk to all your data).

In the profiles all bookmarks, the browser history, passwords and emails are stored.

With starting the Thunderbird (or Firefox) executable from the command line with the parameter –p a profile manager will be open. Here you can create a new profile in a new directory anywhere on your computer. After creating a new profile you can easily copy all files from the old profile location to the new one and delete the old profile (with the profile manager).

FreeMind and Vista


No Comments »

I’m running the mind mapping tool FreeMind for a while now, but with upgrading my operating system to Vista FreeMind started to behave strange. It seems that no standard dialog windows can be open (like open file or save file dialog). If I want to use the “save as� command nothing happened (no dialog window, no exception – just nothing). The behavior is the same for the current version 0.8 and the current beta version 0.9beta9.

But there is a very easy way to fix this problem. With upgrading my Java Virtual Machine for Sun Java 5.something to the current JDK version (1.6.0_02) everything works fine again.

PhotoTagStudio 0.5 and website released

Tags: , ,
1 Comment »

Finaly i released my tool PhotoTagStudio in version 0.5 and its webpage. For more information see http://phototagstudio.irgendwie.net

🙂

PGP Public Key

Tags:
No Comments »

Wer mag, darf e-mails an mich nun auch verschlüsseln.

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.6 (MingW32)
mQGiBEXgRhcRBACiJcDgUlw/Unv24fwvcT1zqXN4o4rOMi0yCgmj/vFGDpXi/1NV
7E18kxBvSbmLEe34UeictmViWM6snyXzbUDkXaIkiwn4O1+BmHDUiIzTZt+ecoiy
lE9jIA9R0VNkLbboc7yMfi2S0NJzJo3yB0tjOcsWrPB42tMhzdFoQ/+DvwCgyvzN
af7LjwJcwP1S6e2xbAabcmcD/A9z+5QPD2fgYIh3HkfONBe2wQQfNr9IzfXt/A6w
4egnH0hfxloDwjsdhHCytreLtJpyoC4CHhf+r41qu0qoGUFkL52xSO04J2ofWUGi
0W9toXeUg0dUwVGfghpzoHorK4ZskCMxrJT6v/4Z1Fjsy0Nf6RbBM6iQkmg4MzcP
GL11BACDTMN7J2P3RXfzklUaZj8ial3uv1Z9Eae8ZMIprIep7+zhSNEoMrQp9Fo+
hbLP/VwvCf3wSlr15hljnKlc6MSWJI3k5InAgWqJjxx/MeaxxEqPbUD7DZOvyZDR
du6tYCBrMlbSA+NOMLAa/bAzMFPmwWkDs02e+4POxXo5+KpjeLQrQmVuamFtaW4g
U2NocsO2dGVyIDxiLnNjaHJvZXRlckB0YXNrb24uYml6PohgBBMRAgAgBQJF4EYX
AhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQrKawAZWwBliw5wCeJR9azwW/
3DJPbdeUOTYDWNRZAr4AoKwmPs4FyqxvytM6bu3f92NWVtliuQINBEXgRiMQCACN
yUuJh1/3bCsphEdqSN22ZQ6MaG8Yr9Cn0A9tPwYXwetH1KSdAfdJ03sf8JAmXkI6
29RMPR821t/YLyELbKkvVOP96xJVOlauLAAVOAT3gEMXu5c3ddFkXqyDAnnhhGGr
FY3S07/hJb6PxsOwaFpQ18aNgqp9KxoaTGN23t4s1yeKx43r6NlCpQPRkWla3j4F
ineesI9fxCjYVVByOuDIzcclv8FqibXNdTsaQfCvclSYd9wuONoTdxNPYHsKhW7i
Q+j4avXPcdvDfpCwtnKoa/JU6EkTLpGWWrL3jY3xcsIKxtxLLobzL0K4tov0pgjU
/+8b73ilxKJWcFgGI6l3AAMFB/9huLsnlanNp4axCqIt4S09MunYcd5eNhMuPmgk
xGHjtya40KaSxjdkF6F5K8DhpNyGB9Fnw/JPuf1NHJjEwrmqXiVvpwukbCcWTMl3
azgK5FUBIVNXhO/t5klpgIuuM+2BVxz77iN+9zkLQFZvH7LTpqX+qZtD1NLQYzUN
n3l2+stCRyMWUR27byZbciFflPDsbEIcy15Hepmqqs6putaPyQFdym8WL87I9bwo
zYoe3aAM/3c0NS5e7jCxnRMtLjydDhwfJf5x2a2jmFv+j9UfmYKEkn5/Io503DeF
WkG9egY4yzmDmygaWAdd7nETGea73KtUDTkjuMqqJSyNhRCDiEkEGBECAAkFAkXg
RiMCGwwACgkQrKawAZWwBljPeACfRWEZG8NlwTQwe1erXR5YTco5irMAn3laPiuK
eCMZMSgRItvxPEGFLBHc
=NBp+
-----END PGP PUBLIC KEY BLOCK-----

Thunderbird Extensions

Tags:
No Comments »

Thunderbird ist bei mir schon länger in Benutzung als Firefox, aber auch hier mal die Liste meiner Extensions:

Auto Zip
Beim Schreiben einer Mail, kann man mit einem Button (oder automatisch) alle Attachments Zippen. Diese werden dann durch eine Archivdatei ersetzt.

Enigmail
Funktionen zum Signieren und verschlüsseln mittels PGP.

View Headers Toggle Button
Ein einfacher Button um bei Mails zwischen dem kleinem und vollständigem Header umzuschalten. Nützlich wenn man hin und wieder in den Header schaut.

Header Scroll Extension
Da der Mail Header, wenn er vollständig angezeigt wird, sehr lang sein kann, bekommt man hiermit Scrollbars.

Display Mail User Agent
Zeigt mittels eins Symbols an mit welchem Mailclient eine Mail (z.B. in der Inbox) verfasst wurde. Wenn ich hier einen Client oder Webmailer sehe von dem ich weiß, dass er kein PGP/MIME kann, dann signiere ich z.B. nicht.

Firefox Add-ons

Tags:
No Comments »

Ich war ja lange zeit großer Opera-Fan, aber bin nun (endlich) komplett auf Firefox umgestiegen. Um mir meinen Feuerfuchs so einzurichten, wie ich es mag (oder wie Opera war), habe ich ein paar Add-ons gebraucht. Vielleicht mag der eine oder andere sie ja auch benutzen, also hier die Liste:
(Die Liste ist nach Wichtigkeit für mich sortiert)

Mouse Gestures
Ich benutze immer und ständig Mausgesten, selbst unter Windows (mit StrokeIt). Das muss natürlich sein.

Tab Mix Plus
Ist wohl einer der Klassiker. Viele Einstellmöglichkeiten fürs Tabbrowsing.

Tab Preview
Wenn man über einen Tab mit der Maus halt, sieht man keinen doofen ToolTip, sondern die Website in einem kleinem (gar nicht so kleinem) Fenster – sehr cool.

Sidebar on Right
Na was der Name schon sagt. Ich konnte es nicht glauben, dass es keine Option hierfür gibt.

IE View
Ein Button und ein Eintrag im Kontextmenü um die aktuelle Seite im Internet Explorer zu öffnen. (Manchmal geht’s eben nur dort)

ImgLikeOpera
Die Bilderverwaltung mit drei Optionen ähnlich wie in Opera: Alle anzeigen, keine anzeigen, nur schon gecachete anzeigen. (Bei langsamen Verbindungen manchmal ganz hilfreich.)

DownThemAll!
Ein Downloadmanager

Tabgroups
Dieses Addon ist noch sehr alpha und derzeit auch deaktiviert bei mir. Aber ich will es unbedingt benutzen sobald es etwas besser wird: Über der Zeile mit dem Tabs eine weitere Reihe Tabs mit Gruppen (die man frei benennen kann) denen man seinen Browsertabs zuordnen kann. So kann man z.B. eine Gruppe für die Arbeite, Projekt xyz, den Blogs usw. offen haben. Ich habe oft viele Tabs offen und da ist es sehr nett.

Session Manager
Soll besser mit Tabgroups zusammenarbeiten um die offenen Tabs zu speichern. Ich weiß gar nicht was er genau tut, aber stören tut er ja auch nicht und alles funktioniert gut.

Wenn ihr ein paar gute Tips für mich habt, dann bitte bescheid sagen!

Elektronisches Papier / ePaper und eBook-Reader


3 Comments »

Seit einiger Zeit geistert ePaper bzw. elektronisches Papier durch die Medien (jedenfalls durch die, die ich lese). Es handelt sich dabei um eine neue Displayform. Im kurzen kann man dazu sagen, dass ePapier sich lesen lässt wie echtes Papier (Blickwinkelunabhängig, Kontrast und Auflösung wie Tageszeitung) und dass es nicht hintergrundbeleuchtet wird wie TFT-Displays. ePapier lässt sich wegen dieser Eigenschaften auch in der prallen Sonne lesen (am Strand). Zusätzlich benötigt es sehr wenig Strom (nur zum Verändern der Anzeige, nicht zum Halten) und sollte (in großen Mengen produziert) relativ günstig sein. Details findet man u.a. bei Wikipedia.

Seit ich von dieser Technologie weiß, habe ich mir ein Gerät wie folgt gewünscht: Großes ePaper-Display (so wie ein Taschenbuch) ein paar Tasten und viel Speicher. Im Prinzip sähe es aus wie ein großer PDA, kann aber weniger (nur Bücher anzeigen), das aber besser (eben überall lesbar sein, und sehr lange Akkulaufzeit). Mittlerweile ist es soweit, es gibt (potenziell) zwei Geräte die man kaufen kann. Zum einen hat die holländische Firma iRex (Tocher von Phillips) ein Gerät auf den Markt gebracht, und zum anderen Sony. Das iLiad von iRex kann mittlerweile bestellt werden, der Sony Reader ist derzeit nur auf dem US-Markt zu bekommen. Im folgenden ein Vergleich der beiden Geräte:

iRex iLiad Sony Reader
Displaygröße 8 Zoll (122×163 mm) 6 Zoll
Display 1024×768 Pixel (160 dpi), 16 Graustufen, Touchscreen (wie PDA) 800×600 Pixel (170 dpi), 4 Graustufen
Größe 155x217x16 mm 124x176x14 mm
Gewicht 390g 250g
Akkulaufzeit 21 h 7500 Seitenwechsel
Interner Speicher 128 MB 64 MB
Speichermedien USB Stick, MMC, CompactFlash MemoryStick, SD
Anschlüsse Ethernet, WLAN (802.11g), USB, Kopfhörer USB, Kopfhörer
Preis 649 Euro 350 $
System 400MHz INTEL X-Scale, 64 MB RAM
Dateiformate PDF, XHTML, TXT (comming soon: MP3) PDF, JPG, MP3

Man sieht sofort, dass der iLiad das größere aber auch bei weitem besser ausgestattete Gerät ist.
Zum einem ist das Display größer, aber daher auch das Gerät, hier muss jeder selber überlegen was er haben will. Aber allein wegen der 16 Graustufen würde ich dieses Display bevorzugen. Ob die zusätzlichen Schnittstellen (LAN, WLAN) nötig sind weiß ich nicht, der zusätzliche interne Speicher ist nichts Wert, da ich in beide Geräte 1 bis 2 GB Karten stecken kann.
Ein echter Mehrwert ist der Touchscreen des iLaid. Die Menüführung kann dadurch viel intuitiver gestaltet werden und man kann Notizen in den Dokumenten machen.
Im Prinzip ist die Formatunterstützung die selbe. Sony spricht noch von RSS und Blogs usw., aber es scheint so, dass sie diese am PC herunterladen und dann in irgendeiner Form (pdf) auf den Reader bringen, das geht natürlich mit allen Geräten die PDF anzeigen können.

Ich hätte gerne so ein Gerät, bin aber nicht sicher welches. Es spräche einiges für den iLaid (bessere Technik, größeres Display, besseres Display, Touchscreen) aber Sony ist groß genug um bald den Markt beherrschen zu können, außerdem kostet der Sony Reader nur ca. die Hälfte (wenn man es schafft einen nach Deutschland zu schaffen). Wenn man in dem Forum von iRex liest, dann klingt die Software des iLaid nicht 100% fertig, aber da passiert gerade viel. iRex scheint noch klein und cool genug um hier auf Kundenwünsche und –anregungen konkret einzugehen. Außerdem haben sie ein SDK veröffentlicht (unter GPL) so dass man zumindest selbst Reader schreiben kann. Wenn der iLaid erfolgreicht wird, könnte hier ein schönes Ökosystem herum wachsen, aber wie bereits bemerkt, wird eher Sony es mit einem billigem Gerät schaffen den Markt zu erobern.

Ich denke aber hier wird in den nächsten Monate einiges passieren. Solche Geräte könnte auf den Buchmarkt ähnlichen Einfluss nehmen wie der iPod und der iTunes Music Store auf die Musikindustrie. Der Durchschlag wird vielleicht nicht so riesig sein, weil nicht so viel Leute lesen wie Musikhören, aber hier kann einiges passieren, wenn es eine Firma (wie Apple) schafft, die Verlage als Partner zu gewinnen und gute Hardware mit einem Shop anbietet.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in