Pages

Wednesday, August 11, 2010

Wise Packaging: Whooo boy, this is a doozy

Hang on to your tampons girls, this is going to be a rambling post, but I have a lot of constipated brain cells that need a detox flush, so here goes…

I'll spare you the usual blabber about how long I've been writing code and doing this and doing that, you can scan my mindless jabbering and figure that out on your own.  I will say that I first ran into Wise packaging when I was doing software development with Visual LISP on Autodesk (ahhh, the good ole ADN days, breath in….. ahhh….).  That was using the GUI to package "new" software for other people to install and suffer with while I ran away counting the money they paid for it.  Good times those 90's were.  If only they actually paid money for it.  I can dream can't I?

Then I went in other directions and ended up relearning Wise from the Scripting side.  I'm talking PURE scripting.  NO GUI.  That isn't as scarry or bad as most that only use the GUI would think.  It's actually much more flexible and understandable, once you get over the learning hump, and consume a few stiff drinks.

Now I'm back to the GUI, but in a very different way than before.  This time it's re-packaging apps (which I did with scripting, by the way) but this is using the full-blown suite, with the software manager database server and shared repositories, checking-in and all that jazz.

Here comes the fun part.  I needed to add some code to a repackaged application to check for some existing conditions before proceeding.  If the conditions are not met, the install exits.  This is constructed from essentially 3 steps.  Getting that simple 3-step list was a complete pain in the ass. 

Why?  Because Wise, then Altiris, and now Symantec have GIGANTIC GAPING-ASS HOLES IN THEIR DOCUMENTATION.  But that's not the worst part.  It gets better.  I jump into their support forums, which are (at least I thought) were intended for customers to request help from "peers" for things they can't seem to figure out on their own or from Google searches.  Well, I didn't realize that Symantec farms out the moderation to "experts" that don't necessarily work for them.  One in particular (no names) is a bit of a prick.  His standard response is "did you read the docs?  have you turned on verbose logging?" and so on.  Nevermind that the question was "can you point me to how to do ____?"

After a day of wasted time dealing with his fly-smacking antics, I searched through their site and low-and-behold I found an article dealing EXACTLY with what I needed.  Google didn't find it for some reason, but their own search did. 

Here's what I needed to do…

  1. Create a public property named "APP_INSTALLED" set to "FALSE"
  2. Create a System Search for the uninstall registry key (you know that one)
  3. Create a Launch Condition that checks if "APP_INSTALLED = "FALSE"" then terminate the installation

There's another semi-documented step that is crucial to making this work:  You have to shuffle the "AppSearch" action above the "LaunchConditions" action in the MSI Script editor on both the "User Interface" and "Execute Immediate" tabs.  This is murky stuff since some people say the way to do this is to go into the Property tables and assign the AppSearch action entry a lower value then the LaunchConditions in the InstallExecute and InstallUIExecute tables.  The default value for LaunchConditions is like 100 or 101 so you make AppSearch like 99 or whatever, but that didn't work for me.  The other method of shuffling the order in the MSI Script editor worked for me (tip: Press CTRL+UP or CTRL+DOWN to move rows around)

So, here's a tip for anyone just getting into this wonderful crack-smoking face-smacking hair-pulling world of software repackaging:  Read the docs.  Search Google. Search the Symantec How-To articles.  Search AppDeploy.com.  Search MyITForum.com  Just don't post a newbie question on the Symantec forums.  They will treat you like shit.  Save yourself the pain.

No comments:

Post a Comment