RambleJam

My little rambles in cyberspace …

Entries Comments


Installing SQL Management Studio Express on Windows 7

13 July, 2010 (22:21) | Computing, Windows 7 64 Bit | No comments

Hmm … developers usually use tools … yes?

Getting this installed on Windows 7 by double clicking the MSI doesn’t appear to work.  No, we have to run cmd.exe as Administrator then use MSIEXEC …

C:\>msiexec /i F:\VS2008Stuff\SQL\SQLServer2005_SSMSEE_x64.msi

Hmm …

WiX UI Not Updating As Expected

6 July, 2010 (10:23) | Computing, Deployment | No comments

During my recent forays into the world of WiX I’ve been slowly hacking away at the steep learning curve. This really is a huge framework that is dealing with an intrisically complicated process. For my own projects I’ve always stuck with Inno Setup and to be honest I don’t have any compelling reason to move them away from Inno at the moment as they are functioning as expected.

Anyway, the last problem I’ve encountered that took a question to the WiX mailing list to answer was regarding showing messages conditionally in the UI based on custom property values changing.  What was confusing was that the log file showed all the custom actions and properties being correctly processed but the UI never actually updated.  Sound familiar?  If you’r having this problem, simply try hitting the back or next button and then go back to the dialog that should have updated?  I bet you now see the updated value in the UI (provided all your WiX source is correct of course!).

This issue is that dialogs are never redrawn.  This is actually a limitation in the MSI UI implementation.  Whilst I haven’t looked into alternatives like replacing the MSI UI (lots of work apparently) there is a hacky solution to this.  Making twin dialogs … basically you create an exact copy of the dialog that should be updated and then once the property changes you simply show this twin dialog and it will appear as though the UI has updated when in fact it’s showing an entirely new dialog.

In the snippet below you can see that the last published event is the call to the current dialogs twin. You will need to give the twin dialog a new Id but all the others can remain the same. Not a nice solution as you now have two dialogs to maintain with any changes but it is a solution none-the-less.

Managed Custom Actions Failing in WiX?

2 July, 2010 (14:53) | Computing, Deployment | No comments

Well after many hours wondering why my WiX custom actions were failing to run I made an interesting discovery.  The library that I had created to hold my custom actions was all being referenced correct from the main WiX project code in a separate WiX fragment, like this:

Changing any part of this made the build process fail so it was finding the dll and adding it to the MSI package correctly.  The first line of the custom action being called was a call to launch a debugger so that I could then step through the method and see it in action, this was never being called so it wasn’t even getting this far.

Anyway, I have now cracked this particular problem.  As it happens the library containing the custom action was compiled for .NET 4.0 … as soon as I switched this to either .NET 2.0 or .NET 3.5 all is happy.  All I can assume is that since WiX itself is .NET 3.5 that is the version that is loaded into the process by default.  So when the MSI tried to access my custom action in a .NET 4.0 library it simply bombed the whole process.

Building Installers

1 July, 2010 (09:53) | .NET / C#, Computing, Deployment | No comments

If you are ever in a situation where you are building an installer for an application and things have gone a bit awry with the uninstall process (tut, tut) there is a nice simple way to get yourself back on track.  Simply run the command below and this will force an uninstall of the product matching the GUID supplied in the command.

Msiexec /x {your-product-guid-code} IGNORE_PRE_CHECK=1

I’ve not needed this yet but no doubt it’s worth blogging about as it will rear it’s ugly head at some point!

WPF / WinForms Property Mappings

20 May, 2010 (09:16) | .NET / C#, Computing, WPF / XAML | No comments

Just found a nice page on the Microsoft site that details some of the property mappings between WPF and Windows Forms.  Might prove useful!!

http://msdn.microsoft.com/en-us/library/ms751565.aspx

VS2010 / C# 4.0 RC Samples

10 April, 2010 (12:46) | .NET / C#, Computing | No comments

I’ve just installed the new version of Visual Studio to start looking at some of the new .NET and C# features and found a rather nice set of code samples on MSDN.

Windows 7 Update

3 April, 2010 (20:43) | Computing, Windows 7 64 Bit | No comments

I have now completed the majority of the setup on my new PC.  All in all I’m seriously impressed with Win 7 Pro.  I have solved all the BSOD issues (Dodgy audio driver from MOTU) and I have migrated all my data accros to the new machine.

It hasn’t been completely painless but all in all it has been a real pleasure.  All my hardware is working as desired and the machine is blisteringly quick.

Absolute thumbs up from here.

Getting Aero Back

3 April, 2010 (10:12) | Computing, Windows 7 64 Bit | No comments

Whilst I was installing my various apps on my new system I suddenly noticed that the Aero theme had completely vanished.  I had previously installed my copy of Spore which also installed DirectX 9.0c and I assumed that this may be the reason.

The Desktop had switched back to classic mode and no matter how I tried I could not find anything related to getting it back.  Even selected one of the preinstalled Aero themes didn’t switch correctly.  After a long slog around the internet I had found a few things to try.

The first was the obvious system reboot.  Nothing changed.  I then checked that the two services that manage this in the background were running correctly.  The two services are:

  • Desktop Window Manager Session Manager
  • Themes

These were both correctly running and setup to start Automatically when the OS boots.  The next thing I tried was to run System File Checker,  to run this open a command prompt and execute this command:

Sfc /scannow

This performed a file system check on the machine but didn’t find any problems.  I then ran the Aero Troubleshooter and the online diagnostic tool both of which didn’t find any issues.  Still no Aero theme on my machine.

I then simple restarted the Desktop Window Manager Session Manager service and low and behold Aero returned!  That is very puzzling since I performed a reboot on the machine which would have obviously restarted this service when the OS rebooted.

Basically, I had installed an older application (pre-Vista) called Starry Night Pro 4.5, now when I launch this app Windows 7 turns off Aero as the application loads using OpenGL but now when I close this application Windows 7 correctly re-enables Aero.  Happy Days!

Window 7 64 Bit / MOTU Traveler

2 April, 2010 (13:32) | Computing, Windows 7 64 Bit | 2 comments

Well, I’ve finally made the switch to a new computer running the latest 64 bit version of Windows 7. I have a new Intel Quad Core i7 920 based development machine and I have to say that so far I’m impressed. The whole OS feels really sharp and responsive, even with the full Aero theme running.

The first two apps to be installed were Firefox and Thunderbird. Both of these apps installed in less than a second!! The speed is literally staggering in comparison to my old single core 2.4Ghz Athlon 64 machine.

The new tweaks to the Windows UI are really nice, the jump menus are a really nice addition as are all the window docking options. I always disliked the way XP handled arranging multiple windows, feels much tighter and ‘thought through’ in Windows 7.

With all that said I have seen a few BSODs!! However, it is totally unfair to blame either than PC hardware or Windows 7 for this as it appears that my MOTU Travelers 64bit drivers are the source of these blue screens. I have just installed a newer set of drivers which were released on the 10th March so I’m about to give these a try and see it the systems behaves better.

All in all this is a very big thumbs up from here.

C# Generic List with a Fluent Interface

1 March, 2010 (21:22) | .NET / C#, Computing, General Jamblings, Music, Nature, Science | No comments

I was just working on some little data provider classes in a sandbox solution.  Just playing around with design patterns and I need a bit of data, nothing major.  A handful of classes that can act as little databases / data sources for my sandbox.  Just to make list a bit easier making lists of things in code I made this generic wrapper so make my code look nicer …

using System.Collections.Generic;

 

namespace JamSoft.Mvvm.ToyBox.Core

{

    public class FluentList<T> : List<T>

    {

        public new FluentList<T> Add(T obj)

        {

            base.Add(obj);

            return this;

        }

 

        public new FluentList<T> AddRange(IEnumerable<T> objs)

        {

            base.AddRange(objs);

            return this;

        }

    }

}

So, once you have this in your solution you can start to do things like this in code:

            var stringList = new FluentList<string>()

                .Add("Moon")

                .Add("Alpha Centauri")

                .Add("Sirius");

Pretty neat things these fluent ideas …

« Older entries