Wictor Wilen

Wictor Wilén is Product Leader at Microsoft. Former Microsoft Regional Director and SharePoint MVP, as well as an author and a well known international speaker

WiX

WIX - CustomActions using VBScript

Here are some small tips when using VBScript CustomActions using WIX.Creating a script CustomActionFirst of all you have to create a CustomAction in your WXS file: <CustomAction Id="Id_Of_ScriptAction" BinaryKey="Id_of_binary" VBScriptCall="Script_Name" /> Id_Of_ScriptAction is a unique Id of your CustomActionID_of_binary is the unique Id of the binary that contains the vbs file.Script_Name is the name of the Sub or Function in your vbs file. Creating the VBS fileCreate a .VBS file with a function or sub that should be executed.

WiX

Microsoft Windows Installer Xml - WIX

I have for a few interesting weeks been using Microsoft Windows Installer Xml, aka WIX, to create an MSI installer for our software solution (finally the number of installation has increased so it was worth it :-).Our software is higly configurable and modularized so I needed to use a tool more advanced that the built-in installers in Visual Studio.Net - and the choice was to use WIX. For you out there who doesn’t know what WIX is then the short story is that; WIX is toolset that builds Windows installation packages from XML source code. The source code and binaries to WIX can be found on SourceForge.To create an MSI you just tap in some XML code and use the provided compilers and linkers and you are up and running in a few minutes - with a simple installation package.Bur, when making a more complex installer you will probably run into trouble due to the lack of documentation on the subject, even if it contains a nice help file I found out that Google was the best source of documentation.I ran into some troubles when I was creating CustomActions and I thought I would write a more thorough article about that in a near future. I found out that making CustomActions using scripts (VB and JavaScript) was really successfull.Are you interested in reading more about WIX check out the blog of Rob Mensching or this great tutorial by Gábor Deák Jahn. What do you think about WIX?And finally: congratulations to the WIX project which celebrates two year anniversary today.

Windows XP

Concerned about the Microsoft Windows Presentation Foundation and the new UI looks

I’m a bit concerned about all the new user interfaces and layouts that will appear when application developers starts taking use of the Windows® Presentation Foundation (formerly code named “Avalon”). This “tecnology” is awesome but it has it’s drawbacks. With the WPF you can create applications that are really neat looking and have high usability, just take a look at Microsoft Expression Interactive Designer. I saw a really nice demo, on a Microsoft Partner event, of a medical journal application looking like a “medical journal” - not the old fashioned MDI interface with a File, Edit… menu. And I guess most of you have seen the Microsoft Max application and the new Office 2007 interface. But what will happen to the usability between applications? As of today almost all Windows applications has a user interface with a menu bar with the File, Edit etc menus, a toolbar with icons and either one document (SDI) or multiple documents (MDI) in the window area. This is very good when adapting to new applications, you know where to find the functionality you want, not in all cases but the most vital functions are easily found. You know how to save a document or to paste something in to your application. Windows Presentation Foundation does not prohibit this usage but it allows developers to create really cool looking applications with a nice user interface. But when it comes to recognizing functions and behaviours I think this will cause a lot of trouble. Let’s take an example of a hospital, where I have seen similar troubles, having several applications from several vendors; they have Microsoft Office 2007, some kind of medical journal system, a financial report system, an intranet etc. Most of the employees use more than one application. It will be very problematic if these applications doesn’t share the same user interface guidelines. This is the point of my entry! Where is the guidelines for these new awesome user interfaces? Do you have the same opinion or experience as I do?Where can I find information on how to make these new applications run smoothly togheter using common guidelines?

Microsoft

How to restore (clone) an ADAM instance to another computer

Today I had to move (make an exact copy of) an ADAM (Active Directory In Application Mode) installation to a new server. It was not that trivial and therefore I thought I would share on how to do it. Add the BUILTIN\Administrators group to the Administrators Role in the Adam instance_This group has a well known SID and therefore can be moved to any server. Se picture below._ Make a backup of the Adam data files folder, using Microsoft Backup_The files can not just be copied because they are locked_ Create the exactly same installation on the new server_Use the same ports, service name, application directory partition etc_ Stop the newly created service_So the files won’t be locked_ Restore from the backup you created in 2)Make sure that you specify to overwrite all files, which is not by default Start the service and test it

Visual Studio

Package Load Failure in Visual Studio 2005 (RTM)

Today, after installing the RTM version of VS.NET 2005, I got some errors due to previous installs of the Betas. One of the was a Package Load Failure for the Class Designer. After a quick search on MSDN Product Feedback Center I found a case (FDBK39168, now closed) with a really nice tool that scans and fixes a number of known issues in Visual Studio.NET. You can download it here: http://astebner.sts.winisp.net/Tools/ttool.zip if you have the same or similar errors.

.NET

Updated ComPlusWrapper class

Here is an updated version of the ComPlusWrapper that I previously published, this one contains a Hashtable for caching the ProgId/Types as well as a method for invoking methods.Please post any comments to the code or any improvments to the class. public class ComPlusWrapper : IDisposable { private static volatile Hashtable s_types = new Hashtable();private static volatile Object s_lock = new Object();private object _ComPlusObject; private Type _type;private bool _IsDisposed = false;