by RajT88 · 3y ago · 0 comments
It's a long story as to why, but I actually ended up building an installer engine in Powershell some years later. I can now officially say all those people are morons, and you definitely should not in this day and age be rolling your own installer engine.
Microsoft promoted it strongly, and mysteriously they never come up with a decent installation support, even for basic desktop apps.
Answering the topic here: it is the business more than the product. With exceptions, as usual.
Windows installer came along and was a lot better. The InstallScript engine carried with it a lot of legacy tech-startup technical debt.
Fun fact: InstallShield became a general purpose packaging tool at some point which spit out *.msi packages (and had a bunch of extensions to Windows Installer engine via custom actions). So it was pretty awesome from that perspective.
In this day and age Windows Installer itself has a lot of legacy design cruft from the era it was designed for - the late 90's.
So you're not wrong, but based on the era InstallShield was more or less crappy depending.
Sorry, but I want to add one more thing: the upgrade logic of MSIs is completely wrong, you need a lot of tricks to do an upgrade.
Patches though... Fuck. I think I could still produce a document that explains everything you need to know about patching but it is a lot more complicated than regular upgrades.
At the same time, my career has moved to Cloud stuff now. Is my life better? Definitely not.
Well, when your customer is an enterprise who wants to deploy your product hands-off onto five thousand machines, and expects a clean uninstall when they want it removed later - yes, it's that hard. Writing installers really is it's own sub-speciality in software development.
The testing cycle was the biggest pain, this was right as VirtualBox had become a thing so at least starting with a fresh system was slightly easier. (The entire company had 4 engineers + some researchers).
I think I was two years post-college as were most of my other colleagues... I'm fairly certain that product never made it out of initial trial (I left the company before it finished).
That sounds horrible. Why didn't you use file based HSQLDB or H2 (or any other pure java sql DB)?
I can't remember exactly why HSQL/H2 wasn't used but I think it had to do with fault tolerance and redundancy and what we could do with postgres replication was preferred over what we would have otherwise used SQLite for.
I was always very impressed by it.
If the application is a single .exe or something that works fine when you unzip a .zip wherever, then the installer functionality needed is almost trivial.
My limited experience is that most complexity in installers comes from the system not helping making it comfortable. Like something not having a simple to use version number, but having to check for 5 registry keys instead, or some such.
However, if someone just claimed they could write a better installer for one specific program of theirs only that was better for that one specific program than an installer built with one of those general engines, that is not so unreasonable except for the in a weekend part.
I once worked for a DOS and Windows utility software company that wrote an installer for each product, and I was usually the guy that ended up doing the installer and it wasn’t difficult. If however they had decided to try to make an installer engine product for other companies to use I would have worked hard to not get assigned to that project.
Reference counting (which could sort of be rolled into the above item), to make sure you're not removing something someone else is using, if you install stuff to a shared location.
Silent installation. Yes, this is an afterthought for a lot of devs, but a lot of techs expect it for rolling out software.
Extensibility / Customization at install time. Also ties into the previous one (how to configure the install with no UI running).
Resume-after-reboot functionality, to update files which may have been locked.
Publishing accurate information into Add/Remove Programs (or "Programs and Features" as they call it these days).
Handling elevation in cases where the user isn't Admin (or post Vista - the installer is launched under the non-admin token).
"Repair" functionality, which requires maintaining the currently installed state and configuration.
Support for packing up and deploying redistributables (maybe even download support).
You start adding all that stuff up, and you realize - you can't bang that out in a weekend. It's a LOT of work actually.
https://groups.google.com/g/alt.games.half-life/c/15MUk17ppH...
* How would we install all these toolbars?
* How would we change them in flight based on characteristics we can get from elevated permissions during install time?
* How can we bundle adware with the installer so it works without an internet connection?
* How can we subvert the Microsoft Store signing algorithm to add arbitrary unsigned payloads at the end of the executable?
* How can we run unsanboxed internet-connected javascript with elevated administration privileges and direct access to Windows API? [0]
* INCOHERENT QUESTIONS ABOUT METRICS?!
What is "repair" for?
What exactly does it do, and what's the intended use case?
I rarely do much on Windows these days, but my impression was that the age of random applications dumping DLL and OCX files into system32 was fortunately long over, so programs stepping over each other should be almost nonexistent at this point.
Story time regarding DLL naming from the old days - Windows 95 would only keep one copy of a DLL in memory (the days when having 8mb of RAM was amazing). We had developed an application that worked perfectly, except on this one salesman's laptop - where it would only work occasionally. What I found was they had installed "Tiger Woods Golf" on their machine and it had a DLL with the exact same name as ours. If the salesman played the game before running our application, Windows said "Oh, I already have that DLL. No need to load it again." and our app would blow up.
Turns out many players still had floppies. Whoops.
https://learn.microsoft.com/en-us/windows/win32/api/errhandl...
I only put "correct" in scare quotes because it is kinda lame that this is still required. When was the last time anyone was happy that they got an "Abort, Retry or Cancel" dialog?
In the ‘80s and ‘90s one of the most popular PCs in Japan was the NEC PC-9800 series. These were x86 machines but were not IBM PC compatible. MS-DOS and Windows supported them, but didn’t hide all the differences from IBM PC compatibles from apps.
In particular, the boot drive was A: so a system with two hard drives and a floppy would usually have A: and B: be hard drives and C: be floppy.
That really confused a lot installers that assumed hard drives always started at C: and that A: and B: were always floppies if they existed.
* Getting real deep with detecting OS/instruction set and edge cases
* Constantly validating permissions on every directory and file
* Constantly verifying checksums on everything put in place
* Concurrency controls to make sure the user didn't launch the installer twice, or the system wasn't live running when being reinstalled.
* Dependency verification was it's own rats nest of problems
* Uninstalling
Easier problems: * Logging
* Status tracking (except for really large files things get weird...)
* Aborting/Cancelling installSo - do you want to log variables for debugging purposes once installers get to a certain level of complexity? Great. Now you're logging people's usernames and passwords, and you have to add some functionality to not do that.
Or homebrew which is really just dependency management + standardized directories for files which is what it should be. Installshield was a solution for an entirely artificial problem.
There is a reason Mac had such tiny market share for so long, especially among enterprises. Installation was among pros and cons, but I would advise you to come off your high horse and understand the rest of it. Some reasons technical, some not. For a long time enterprises shunned Mac for extremely pragmatic reasons.
I think the last installer I used was probably the Linux Mint/Ubuntu live CD installer?, But other than that I don't think I've seen an installer for a couple years. Albeit I'm in the Linux ecosystem now so maybe that's why
The model on Windows is that you ran installer program that installed the application. Installers had to do a lot more stuff than drop the application in the right place like change registry entries or write files in other place. InstallShield wrote the installation engine and build tool.
Windows moved to model of .msi packages with .exe wrapped. InstallShield turned into an .msi build tool. Macos has .pkg installer for things that can install .app. Linux has .dpkg or .rpm. All of them have the installer pre-installed.
https://en.m.wikipedia.org/wiki/InstallShield
MSFT released MSI 1.0 in 1999.
https://en.m.wikipedia.org/wiki/Windows_Installer
Post 2008 or so, there was a very good question of why anyone would use anything other than *.msi on windows. But most Installshield users by then were building those packages with InstallShield by then.
These days, lightweight apps and dev tools are still preferred to use *.msi or *.exe based formats instead of windows store apps. Partly because it is quick and dirty to do so, and cheap using things like WIX and NSIS. But InstallShield still has a legacy base among less sophisticated users; it is easier than WIX and more robust than NSIS and the like.
Windows Store package formats are superior in most ways.
Each type of entry in the config file had a module which knew:
- How to check if the entry was already done and in a good state
- How to uninstall cleanly the thing (not actually needed; this was for system imaging)
- Usage of variables that would dynamically configure the system
- Variables also could conditionalize what gets installed
At the end of the day it was somewhere between a true installer engine and Powershell DSC (DSC would come about a few years later). This installer is probably no longer in use, as you can imagine more robust ways of solving this need exist now.
It was a heck of a lot of fun to build and watch it working though!