Spass mit Active Desktop
Tagged:  •    •  

Der ActiveDesktop ist eine Technologie die Microsoft Seit Windows 2000 mitliefert, die es ermöglicht Webseiten auf dem Desktop darzustellen. An sich eigentlich nichts besonderes, aber man kann zum Beispiel über VBScript Programme ausführen, oder auch RSS-Feeds anzeigen.

Hier erstmal ein Minimalbeispiel:

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html>
  3.     <head>
  4.         <script language="VBScript">
  5.         <!--
  6.             Sub runProgram (byVal Program)
  7.                 Dim objShell
  8.                 Dim lngReturn
  9.      
  10.                 on error resume next
  11.          
  12.                 set objShell = CreateObject( "WScript.Shell" )
  13.                 Program = Replace(Program,"'","""")
  14.                 lngReturn = objShell.Run (Program, 4, 1)
  15.              
  16.             End Sub
  17.         -->
  18.         </script>
  19.         <!-- compliance patch for microsoft browsers -->
  20.         <!--[if lt IE 7]>
  21.         <script src="ie7/ie7-standard-p.js" type="text/javascript">
  22.         </script>
  23.         <![endif]-->
  24.                 <link rel="stylesheet" type="text/css" href="style.css">
  25.  
  26.     </head>
  27.     <body>
  28.         <a onClick="runProgram '''%ProgramFiles%\Mozilla Firefox\firefox.exe'''">Firefox</a>
  29.     </body>
  30. </html>

Die Funktion runProgram führt einfach ein Program aus, was sehr praktisch ist das man hier auch Variablen wie %UserProfile% angeben kann, wenn man mit unterschiedlichen Benutzern arbeitet, aber überall den gleichen Desktop haben will. Das IE7 Script ist auch sehr zu empfehlen da es transparente PNGs ermöglicht, Pseudoelemente, wie :hover, bei allen Tags zulässt und noch ein paar andere nettigkeiten. Im Body Tag ist dann einfach ein Link der Firefox öffnet. Einene kleinen Haken hat das ganze noch und zwar muss man, wenn man das erste mal ein Programm öffnen will eine Sicherheitswarnung akzeptieren, da habe ich noch keinen Weg gefunden wie man die wegbekommt, sollte man die Seite aber nicht explizit neuladen, so wird man die Meldung auch kein zweites mal erhalten. Ansonsten kann man nun die Seite so gestallten wie man will, vorallem sind auch keine Grenzen gesetzt, so könnte man auch diverse Hardware Informationen, über WMI, anzeigen lassen.

Hier noch ein Screenshot von meinem Active Desktop:

Screenshot meines Active Desktops

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <ins> <del> <blockquote> <abbr> <br> <pre> <p>
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options