What I Learned Spending A Month With InstallShield.

InstallShield by Flexera is a packaging development tool that, through a combination of settings and scripts, produces an installer that aids in distributing your software and setting up its prerequisites.

Other developers throughout my company would snicker when mentioning InstallShield after hearing that I was assigned to a project that upgraded our distro from version 2012-Spring to 2016. Though I won’t scoff at the product, it posed certain challenges that it shouldn’t have.

Challenge 1. How to learn it

There is no book

At least, there is no recent book. The latest one on Amazon is from January 1st, 2004. That’s 14.5 years old, and InstallShield has changed quite a bit since then. Windows XP was the latest operating system at that time.

To put that in perspective, YouTube wouldn’t exist for another 2 years. Heck, Facebook didn’t even exist!

I didn’t buy the book.

There are no inexpensive online courses

Pluralsight? Nothing. Lynda.com? Nope! LinkedIn Learning? Nada…

There’s very little free content out there to guide someone who has never used InstallShield from a developer standpoint.

There is, however, a $2500 class offered by Flexera to teach the basics – basics that don’t cover the type of installation project I was faced to upgrade and debug.

Their Online Help is Problematic

Some people might claim that InstallShield has good online documentation. I disagree. There aren’t enough examples and some of the InstallScript’s language statements, like “external” even tell developers not to use it (“The keyword external is reserved and may not be used.”), even though it’s required to reference other library packages and scripts that extend the functionality, as detailed in their blogs (“Functions that can be called by a Suite/Advanced UI action [and by InstallScript custom actions in Basic MSI projects] must be prototyped with the export keyword.” *Using InstallScript Actions in Suite/Advanced UI Projects*). At the time of this article, Flexera’s entire helpnet server is down, so users trying to find help on their InstallScript API are dead in the water was given an impressive update that helps put much of its InstallScript in context.

Still, when you can access their documentation, it’s terse description, lack of examples and blatent misleading elements make development in InstallShield a chore. Hopefully this will improve over time, given that they’ve just invested time and money with the recent roll-out of site improvements and see it as a priority in a growing market.

Learning about a feature or how an API command is used requires the build-measure-learn method (or experiment-fail-learn) with a lot of failure in its cycles. The trick to this is to fail fast and fail early. Failing often will just come naturally because so much experimentation is involved.

Learning and Help is Only from Generous 3rd-Party Release Developers

There are some blogs and StackOverflow threads that were very useful, but each post is specific to a feature, not the overall use of the product.

The most helpful of these are:

Surprisingly, StackOverflow wasn’t very useful. When you look at questions tagged with “InstallShield”, there’s about a 50% answer rate and a 4% accepted answer rate, which was the same rate as down-voted questions. In my personal opinion, people are down-voting legitimate questions because they don’t have the experience or understanding of InstallShield and thusly don’t see how the question is related. But there’s all sorts of trolling on StackOverflow that I won’t get into right now. That’s a topic already addressed on other blogs.

Challenge 2: Versatility

The more features a software product provides, the more complicated it is to use. This is why simple systems, such as the basic calculator in your operating system, are first offered to consumers instead of feature-rich systems, such as a programmable calculator.

Installshield states that it has 3 different types of projects, but it’s documentation specifies 12 types of projects:

  • Advanced UI
  • Basic MSI
  • DIM
  • InstallScript
  • InstallScript-MSI
  • InstallScript Object
  • Merge Module
  • MSI Database
  • MSM Database
  • QuickPatch
  • Suite/Advanced UI
  • Transform
  • Visual Basic .NET Wizard
  • Visual C++ .NET Wizard

The point I’m making here is that their documentation is confusing about what you can do with InstallShield. After spending time in it, I’ve become aware that it can do quite a bit. It’s very versatile, but its functionality is compartmentalized and, as I’ll bring up later, one project’s ability doesn’t share across to annother’s. There are three overall categories of projects (Basic MSI, InstallScript and InstallScript-MSI) but within those, you can chose variations and build them to certain specifications to handle its various 3 tasks: installation, maintenance and uninstallation.

Getting a feel for what it can do takes time for experimentation and going over documentation where you can find it. There are some “walkthroughs” on Flexera’s site, but they hardly substitute for a good YouTube video. It’s just text telling you what to do, but not giving you context as to where to find it. For example, you might read something like this from the top of their help pages:

note_project Project • This information applies to InstallScript MSI projects.

Pay close attention to this. They didn’t exist before (or at least they weren’t formatted to make them so visible before) their HelpNet update. This can save you hours of time because the InstallScript MSI and the InstallScript (non-MSI) projects do not share the same API library.

The company I work for used InstallScript-MSI, which is a mix of configuration throughout the various project areas and InstallScript code that resembles JavaScript or C# syntax to a small degree. In that mindset, you tend to think that an API is an API, but that’s not the case with InstallShield.

For example, in the InstallScript-MSI projects you use SQLRTTest whereas in the InstallScript (non-MSI) projects you use SQLRTConnect2. Neither project type can view the others’ SQLRT library. In this case, the methods are nearly identical; it would have been nice if Flexera’s API showed some consistency here. But before their HelpNet update, it was difficult to discern which of the two APIs you were looking at, which meant I spent several hours trying to make SQLRTConnect2 work on a project that wasn’t designed to handle it.

Challenge 3: puffed-up expectations

“What’s taking you so long?!” one of the managers in my department began. “We don’t have the budget for this. We needed to just spit some installer out and get on with the features our clients care about – the stuff they’re paying us for.”

To one extent, he’s right. The installer is just a brief, 10-minute experience compared to the hours the client spends in the product… however, it turns out we sell a product that is so difficult to install (and uninstall) that the clients are getting frustrated. To make matters worse, this product was never meant to be a main feature of our organization; I don’t think we even charge for it, but our sales department in desperation to sell more hardware suddenly felt that pointing out this free software will let them do all the heavy lifting they’re wanting to do. Now we have a department pushing this weaker product to clients instead of the strong, and intended, software to configure the hardware components. That means we’ve suddenly gotten a surge of clients trying to install a product that has defects the first minute they try to install it.

Managers sometimes think that if you spend $6,000 to $10,000 per license on a product that it shouldn’t cost much to use it. What makes it worse is that because the program is so expensive, the company I work for only purchased one license, so all developers have to log onto one machine and do our work there… and that happens to also be the build server! Great care has to be done to sandbox the development from the build.

The rules are shared. This is critical to know. When you set prerequisites for the installer, you specify a set of rules. Operating system rules are matched as an OR operator. All other rules (such as registry settings and file versions) are matched as an AND operator. So if you create a rule such that you install a patch on Windows 7, 8 and 8.1 (but not on any other OS) if (and only if) a certain registry key exists and a file exists at a certain location, you’d create a rule with 5 conditions: 1 for each of the three operating systems, 1 for the registry and 1 for the file.

If a rule is faulty – say it’s installing when it shouldn’t because there’s a misunderstanding about where the key exists – then just by saving the rules file, the build server starts using it. And it uses it for regression builds, so if I am currently on version 2.2.2 and I need to patch version 2.1.7, the new build of version 2.1.7 will include the changes to the installer’s rules but not to anything else, so a script that requires a different prerequisite ruleset would actually require a fully separate prerequisite install. There’s no isolation. When you save a rule you save it to the entire InstallShield instance on that machine – not to your project.

So there’s a significant amount of time overhead to plan and develop in a way that doesn’t impact our build. What was originally estimated to be a 7 day project ended up exploding into a 21 day project to accomodate the steep learning curve, the unpleasant discoveries, navigating the (then) misleading documentation, and the poor “money-saving” configuration. I was overly optimistic because of the expectations from higher level developers and/or management that this “shouldn’t take long”. Though now that I reflect on their comments I think it was more a statement of what they wanted rather than one of experienced anticipation. The last time the InstallShield projects were touched was three years ago, which implies that it was such a pain then that nobody wanted to touch it. That developer has left the company since then, so we couldn’t expedite the development from his experience. Maybe if he was still around, we could have utilized his experience and it actually would have taken only 7 days. With what I know today, I think I could work out the changes and upgrades the company wanted within that time period.

I think it’s safe to say that more expensive products require more training to utilize them. Photoshop isn’t cheap, and takes a couple of weeks to learn well enough for rudimentary photo touch-up and post-processing. It takes years to know well enough to navigate through the app with confidence and to identify the best way to process certain effects. The product our company creates is complex and takes weeks to learn most of its features. InstallShield appears to be no different in this matter. The main difference here is that InstallShield creates a product that people use for a couple of minutes, then it’s done. And unless something goes wrong with the install, you never really think about it. Whereas with Photoshop and enterprise products, you spend so many hours within it that there is that sense of pay-out, so development cost expectations are justified.

Updated Geocaching Coordinate Calculator

Open the Popup Coordinate Distance Calculator

In Geocaching there is a type of cache called a “Multi”, or “Multi-Cache”. It requires the user to locate an initial cache that provides directions to the next cache, which when found provides directions to another cache, and so-on until the final cache is found. My initial thoughts to these type of caches were that they are like the old fictional pirate treasure maps.

I’m sure you’ll recognize the following excerpt from a popular 80’s movie:

Mikey pulls out the doubloon and verifies another critical alignment.

Mikey: Guys...I think I have a match. I'm sure of it! The lighthouse, the rock, and the restaurant all fit the doubloon. That must mean that the rich stuff is near the restaurant. So, (pulls the map out of his shirt), wait a second, Mouth, I'm going to need you to translate the map because I don't understand Spanish. (Pointing) Right here.

Mouth: (Looking at the map) Alright, alright, alright. (Reading) (spanish)

Mikey: What does that mean?

Mouth: Ten times ten.

Mikey: Uh, hundred.

Data: Hundred.

Mouth: (Translating) ...stretching feet to nearest northern point.

Mikey: North. What's north? Which way is north?

Mouth: That's where you'll find the treat.

Mikey: The treat...the rich stuff! The treat! The rich stuff. That's it!

Data: (Checks his compass and points) North is that way.

Now you can fulfill your childhood fantasies of joining Mikey’s gang in search for magical pirate treasure right from the convenience of this page.

I first attempted to create this calculator five years ago. My understanding of spherical coordinates was very limited – it still is – but I cracked open some websites and learned quite a bit. The trigonometry I did so well in during my time in High School was rusty, but I remembered enough that it was helpful.

It turns out this calculator was already placed up on NASA’s website a couple of years ago, though I’m not sure what algorithm they use. When doing research on that, I came across one of Wolfram Research’s pages on Spherical Trigonometry. Ah! Good head-spinning stuff… pun intended.

Sometimes it’s not a multi-cache, but a puzzle cache which would call for a calculator like this. Examples include the No Latitude and A-Rock-No-Phobia puzzle caches.

Here’s what to enter:

  • Distance (Feet) = the distance from the center point in feet. If you’re interested in metric entry and results, post a comment.
  • Heading (Compass Degrees) = the heading in compass degrees. 0 degrees is due North, 90 degrees is due East, 180 degrees is due South, and 270 degrees is due West.
  • Latitude of Origin = coordinates in the format “N XX° YYY.ZZZZ'” where N denotes North/South from a drop-down, XX is the degrees and YYY.ZZZZ is the decimal minutes. This is the common form that Geocaching.com provides for coordinates.
  • Longitude of Origin = the same as the Latitude, only for Longitude. It should now be able to handle W or E hemispheres to handle our friends on the other side of the meridian.

The Calculations are for nerds. The Results are for you. The coordinate results should display a link to Google maps when you’ve entered in all the criteria.

Update: 2017-06-15, I corrected the algorithm. Instead of using the angular distance, it uses a formula based on Haversine distance equation.

Open the Popup Coordinate Distance Calculator

Have fun and post a comment to let me know if it’s useful.

The Telecommuting Family Man

OFFICE door

As someone who has worked from an office in his house for nearly 15 years, I have learned through mistakes and good choices the discipline and configuration needed to enjoy the comfortable benefits of telecommuting that many companies are now feeling inclined to provide.

This post provides some tips to a challenging situation that could make that job with a daily pajama commute a happy memory.

The Single, Most Important Think To Act On

The most vital tool in telecommuting from home that you need – what you must do is to create a metaphysical “office door” that becomes part of your end-of-workday routine.

There are times that telecommuters will feel the urge to return to work after sitting down to a family meal. But don’t do it. Don’t blend your personal time with business time or you’ll look back with regret.

I learned a trick from another telecommuter that I call “brushing the leaves”. Each day, shortly after five, he would walk out of his “office” (I think he used his dining room), walked outside, shut the door, then brushed the leaves of his tree. He equated it to brushing off the worries of his workday. Then he would turn back around, open the door and enter the house, leaving his daily work-related concerns outside on the tree. This allowed him to spend time being completely present for his wife and children.

You work so your family can have a good life. The irony is how easy it is to allow that same work rob them of that good life in the process.

The most important tool to your workday is the “office door” that helps you separate the roles you must perform to support who you’re working for and who you live for. Whether physical or not, the separation is a discipline that hinges solely on you.