What makes a slick application installation?

Answer: Something made by me. Obviously.

But on a more serious note, I was asked something like this in a job interview recently (didn’t get the job – was rather gutting).

But it’s a valid question, especially for when deploying applications in a corporate environment. For those of you who don’t know me in the real world, I currently work as an application packager for a large engineering company that shall remain nameless. As an application packager, I either modify existing MSI installers to work in our environment via a transform, repackage applications into the MSI format, or I sequence them using Microsoft App-V Sequencer.

Over my time in this profession, I’ve seen many applications and I’ve seen almost as many weird ways to install them. Here are some of the (many) conclusions that I’ve come to, that will maximize efficiency in a corporate environment, when using the MSI installer format

Minimize user interaction

We don’t want users sitting there during installation, wondering what path the application should go to, then setting it to something silly. We want to install all applications with the bare minimum amount of user interaction, but we also want a visible process to show that the installation is happening.

Running the installation with the /qb switch is an ideal start – the user will see a progress bar, but they shouldn’t be able to change anything. The visibility will give the user assurance that something is happening, but will allow us to keep the final installation consistent across the board.

Naturally, as no interaction is possible during installation, everything should be preselected in the MSI / MST file – including installation paths,  shortcuts, features, license servers and anything else that is required. This also makes things nice and consistent for if issues occur at a later date.

Custom actions. If they can be avoided, do so

Custom actions can be a brilliant tool, but when used to do the tasks that the MSI can natively do, they are the work of Satan and all his little minions. If the MSI can’t do it, use a custom action. If the MSI can do it, then let the MSI work in the way it was intended. One example that I like to remember is an application I worked on a while ago – it dropped in five files to the same directory and installed nothing else. There was one custom action – which was used to set the installation directory. The job could have been done much better via the directory table.

Don’t use hardcoded paths

When somebody puts a hardcoded path into an application deployment, a technical support person dies. It’s a scientifically proven fact…

Actually it’s not a proven fact. But something you shouldn’t do. Imagine that somebody writes a script to drop a file into C:\WINNT and at a later date, a new system build changes the directory to C:\Windows. That’s an issue that will annoy users, create unnecessary support calls. Time is money and that hardcoded path cost time to fix.

Quick example, I worked on – there was an application (in a 32bit MSI) which had a series of VBscript custom actions. These scripts had literally hundreds of hardcoded paths, pointing to C:\Program Files\*various locations*. On a 32bit machine, the installation worked. But as soon as we tried a 64bit machine where the installation path moved to C:\Program Files (x86)\*various locations*, things started to go wrong. It was fixed but it wasn’t a quick fix.

User a transform when amending a vendor MSI

A user has asked for a piece of software made by Bloggs Inc. Bloggs Inc. has been nice enough to supply an MSI based installer, meaning you don’t need to do a full repackage. Happy days.

User has also requested a couple of changes to the installer – maybe a new installation path or having all features preselected to be installed. Before you go and save the MSI with those changes made, don’t do it. Save a transform instead.

Couple of reasons – first reason is that a vendor is far more likely to support an application that has been installed with a transform laid on top of the MSI, than a application where you have altered the actual installer. Second reason is that if you open up the MSI in Orca then drag your MST on top, Orca (and most other packaging tools) will provide you will a nice clear layout of all the changes. Makes it somewhat easier to track back if you break something.

Documentation

So you have a slick, robust installation process for your installation. Document that process! Supposing you’ve finished packaging a particularly nasty application – it’ll get released to the users and they will be happy. Right until a year down the line when Nasty Application 2.0 is released. You’ll sit there going through some of the head scratching moments that you had originally. Unless you documented it beforehand – then you can track back to the previous version and hopefully send version two out in a fraction of the time that the original version took.

This applies to everything from the smallest property change, right up to the gritty details of a fully loaded SQL Express command line and answer file. If it will help in the future, write it down. Simple

So that’s a few thoughts. I have many others but they can wait for another time. Hopefully these tips will help you avoid images like the one below:

Shutting down or rebooting a remote machine via Remote Desktop Connection

This is something that I was asked at work the other day and I thought I’d put online for the rest of the world to see. I was asked how to shutdown or reboot a machine via a Remove Desktop Connection.

Now at first this seems like a silly question, but when we remote onto an XP machine at work, the start menu literally gives you two options – Log Off and Disconnect, so there is no obvious option for just rebooting a machine.

You could use “shutdown -r -t 01” from command prompt / the run dialog, but that’s a fair bit of faffing around. (Incidentally that’s a reboot command)

Alternatively, you can close all programs down and then hit Alt+F4. You’ll then get a dialog that allows you to disconnect, log off, reboot, go to standby or shutdown.

You don’t even have to close all programs. Just make sure you’ve got the desktop selected and then Alt+F4 should still bring the shutdown dialog. The below image shows what you’ll be looking at when the dialog appears:

Off topic, I should get back to app comments fairly soon – it’s been a pretty busy few weeks recently so I’ve not really had time and write much.

How to run the Command Prompt under the SYSTEM account.

Yet another thing that may be useful to the IT people out there – a guide on how to make Command Prompt run under a system account.

 Quick note & disclaimer- this guide assumes that your user account has the rights to create, edit and manually start services. Without these rights, this process guide will fail. As for the disclaimer, this account pretty much provides ‘god rights’ on your computer. What you do with it is entirely up to you, but I’m in no way responsible for you breaking your system.

Moving on…

To get command prompt to run as an admin account, you will need to create a service where the command is to launch command prompt, then launch another command prompt window from there. This is because directly launching command prompt will start it and then close it almost straight away. Launching the second window will give you a window that remains open until you decide to close it.

The command to do this is as follows (and will most likely need to be run via an admin command prompt, depending how your system is setup):

sc create SysCMDPrompt binpath= “cmd /K start” type= own type= interact

Note that all spaces in the command line above are required. Taking and spaces out may result in a failure to launch.

There are two methods to running the service (and thus system CMD).

First Method

– Launch a command window with an account that has permission to launch services

– Enter the command line sc start SysCMDPrompt

Second Method

– Launch the Services control applet with an account that has permission to launch services

– Find the SysCMDPrompt service

– Start the service

Which method you use depends entirely on personal preference.

I’ve bodged together a quick program that creates the service, launches the service and then deletes the service. You can find it here:

http://dl.dropbox.com/u/64814714/System%20CMD%20Launcher.exe

Running under XP is flawless as far as I can tell, however in Windows 7, you will get a message about Interactive Services Detection. Click View the message and you’ll be able to run it – only flaw is that it runs in its own bubble, where you cannot access other programs at the same time (unless run via the command prompt window).

Note in my testing, Windows 7 had to restart explorer most times, upon reverting back to the standard desktop view…

Entering long file / directory names into Command Prompt quickly…

It’s amazing how few people know this. If you need to enter a long file or directory name into command prompt, you can press the tab button and command prompt will cycle through all the files and folders below the current directory.

Better still, if you start typing in the file that you need, then press tab, the field will generally autopopulate closer to what you need. 

I’ve tested this on XPSP3, Vista and Windows 7. While it ran straight off the bat in all three systems, you may get issues initially with XP. Microsoft have put a knowledgebase article up which you can find below:

http://support.microsoft.com/kb/310530

So there you are – a solution to the frustration that incorrectly typing long file names can cause.

Is the humble MP3 player a dying breed?

So I was sitting at my desk the other day doing some sort of work. I’ve got my phone sitting in it’s holder and I’m happily typing along, with my MP3 player plugged into my ears, listening to music.

Enter some random person. He asks…’why are you using an MP3 player.’  The man does kind of have a point. I’ve got my phone sitting on the desk, which is capable of doing everything but the dishes and yet I’m using my Creative X-Fi for music instead.

It’s for the same reason that I don’t belive that the MP3 player is a dying breed. Aside from the fact that some MP3 players produce better quality sound and that some people just don’t want to take the jump to a smartphone, there is another reason…

.. we have phones now that can do everything and sometimes that’s a little too much. Allow me to explain:

Bob is working in an office,writing up a report on the efficiency of something or another. He has his MP3 player plugged in to drown out some of the background noise and so that he can concentrate better on the task at hand.

After listening to the same album on repeat for a while, he decides that something else would be good. He picks up the MP3 player, changes album and continues working on time.

Bob gets the work done, gets promoted and gets a fat pay rise.

Now meet Eve. She’s also writing a report on something or another. Let’s call this report ‘Procrastination for the Masses’. Like Bob, she has music on to drown out the background noise. A minor note is that she’s using her iPhone for it instead.

Like Bob, she just put one album on initially and it begins to grate after a while. She picks up the iPhone to change track. While she’s got the phone in hand, she replies to a text message and notices she has an email. The email is from Facebook, saying that Herp McDerpington has invited her to an event. Naturally she goes to Facebook to accept the event invitation. Then she goes onto Twitter to let others know of the event.

The cycle continues. Eve misses the report deadline. She gets fired. Then loses all her money. Then dies due to Hypothermia, as she can no longer afford the heating bills.

So the example was a little..over dramatic and exaggerated. But I think that the MP3 player has a place. A place for the Luddites who won’t get smartphones. A place for the people that just want to get stuff done. A place for the audiophiles that want to listen to higher quality music. But most of all, I belive it has a place in history – as the item that began the steady decline of the CD. The item that succeeded where MiniDisc failed.

Preventing Word 2007 from showing document markup by default

Note: Apparently this can also apply in Word 2010

A minor annoyance of mine is when Word 2007 automatically shows document markup, every time you open a document with markup in it. I put my somewhat useless google-fu into action and failed to bring back any worthy results, so spent a fair amount of time digging through the options in Word. Because of my google-fu failings,  I’ve done a quick write-up and put it on here in the hope it helps at least one other person. Check out below for a quick guide:

1. Open Word and click on the Office Button

2. Go to Trust Center

3. Then click Trust Center Settings

4. Go to Privacy Settings

5. Untick the box labelled Make Hidden markup visible when opening or saving

6. Restart Word

Voila! Problem solved. And if you ever need to return to the messy looking thing that is document markup, just recheck the box.

On a side note if anyone from Microsoft is watching, but apparently Word 2010 has the option in the same place. Could you please move it to somewhere a little more logical in the next version. I’d personally suggest Options > Display

Spotify…keeping the silence out of mind…

Out of all the things I run whilst I’m on the internet, this one gets the most use. Essentially it’s a music player that has access to millions of tracks, all potentially for free.

The free service does have a few drawbacks – main one being that you get the occasional advert between tracks, but it’s a lot better than commercial radio in terms of frequency. Ads are few and far between and to be honest I don’t even notice them anymore – if I go back to the commerical radio reference, I can’t remember the last time that the radio in my car tuned into one, and there wasn’t an advert playing at the time. Spotify Free (the invite version of free), has around a 90% music, 10% advert split for me – that said apparently it also depends on what you listen to.

There is a free version that doesn’t need an invitation (Spotify Open), but it caps your streaming to 20 hours a month. If you can still get it, and have a friend with invites availible, I suggest you go for spotify free. There is no cap.

You can find entire CD’s to listen to – meaning you can try before you buy, without the more paranoid among us worrying that the RIAA are going to sue for piracy. The amount of people I know that have bought a CD based on a few tracks, and then found they’ve shelled out for 3 good tracks, and 10 tracks of dross is unsuprisingly high.

You can also connect it to Facebook, after which you can see the public playlists that your friends have made availible, which comes in handy – especially when you want to recommend a song or artist to another person. Apparently you can do this without Facebook, but it’s not something I’ve bothered to do.

One other perk is that the interface if friendly and easy to get to grips with. If you’ve used iTunes, you can see where some of the inspiration has come from, but it’s a fresh take on a old trick.

That said, there are paid for versions that I’m told are excellent – they allow compatibility with certain smartphones for music on the move, offline mode where you cache some of your tunes and other bonuses. I’ve not taken the plunge in this because I’m a cheapskate – which is pretty much my only excuse.

So that’s a very brief look at Spotify for you. It probably doesn’t cover half the basics, but then again this post was thrown together in about ten minutes 🙂

%d bloggers like this: