At PDC Microsoft played down the significance of adding COM support to Silverlight 4 when run out of the browser and fully trusted (you can also be out of the browser and not fully trusted). The demos were of Office automation, and journalists were told that the feature was there to satisfy the requests of a few Enterprise customers.
Now former Microsoft Silverlight program manager Justin Angel, who has implemented his blog in Silverlight, has spelt out what we all knew, that Silverlight with COM support can do just about anything. His richly-illustrated blog post has code examples for:
- reading and writing to any file (subject I guess to the permissions of the current user)
- executing any command or file
- emulating user input with WShell.SendKeys
- pinning files to the Windows 7 taskbar
- reading any registry values
- adding an application to the Windows startup folder
- doing text to speech using Windows built-in engine
- accessing local databases with ODBC
- automating scanners and cameras
- using the Windows 7 location API, accessing the full .NET Framework
- and of course … automating Microsoft Office.
Well, fully trusted means fully trusted; and these are great features for powerful though Windows-only Silverlight applications, though I hope no user installs and trusts one of these applets thinking it is “only Silverlight” and can’t do much harm.
The post also has comments on the lack of any equivalent feature for the Mac in Silverlight 4:
If Microsoft chooses to not go ahead with Mac support in Silverlight 4 RTM, well, it’s not because they couldn’t
says Angel, suggesting that it would be easy to add AppleScript support. (I had to type that quote – no clipboard support in Silverlight 3).
Of course there is time for Microsoft to unveil such a feature, say at Mix10 in March, though I wouldn’t count on it.