Jump to content

  • Log In with Google      Sign In   
  • Create Account

Why are there so many bad installers out there? and Windows questions on Symlinks


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
16 replies to this topic

#1 Luckless   Crossbones+   -  Reputation: 1892

Posted 14 July 2011 - 08:25 PM

So, two fold post. Killing two birds with one stone is always a great thing.


First off, I have noticed a lot of software these days has gotten into the habit of skipping some of the most basic steps during install. Namely, asking you where YOU want the program to exist. I can't believe the number of programs that install to where THEY decide, or rather, where some programmer decided they should go. The install of windows I am on is only a few days old, and looking at the Program Files folder on the C drive,... Adobe, AMD, GIGABYTE, Google, Intel, Microsoft, Microsoft, Microsoft,... etc. All of this software installed, all easily could have lived anywhere on any drive, (Or even other computers for that matter. This is the modern age.) and yet not one of them was installed there by my choice.

I don't really remember things like this being as bad in the past. It was standard practice to type/click "Setup.exe", blow through a few warnings/prompts, and somewhere along the line would be a friendly little text box or something waiting for you to tell you were all these files were going. Sometimes they expected you to be so helpful to the software that it wouldn't even provide a default path!

Does anyone have any good reason why so many programs these days Demand the Right to exist on your C: drive?


And to kill the second bird, and the whole reason why I'm noticing this. I will admit to not being the greatest administrator out there, but I only let myself be in charge of my personal computers and a few family systems. (Ok, and one weekend with a super-computer. It only took them a week or two to get things back up again, but it wasn't my fault someone couldn't read their own interface design documents.)

So I'm currently in the process of settling in after a major computer upgrade. One of the key upgrades was going with a SSD for the system drive, but due to budget limits I went with a 50 GB drive with the plan of limiting it to Windows and a bit of "Work Space". All programs and such that had no business being on C: would exist on one of the many other drives I have, but most likely D or G. And by programs that had no business being on C, I mean every last one of them! In theory it was simple, just don't install to C: and the world is golden.

However, as I've already said, many installers assume they are smarter than you, or that your hard drive is a digital bag of holding or something, and don't bother with the notion that another, possibly better, lettered volume exists in the universe, and happily install themselves anyway. Most aren't that bad. After all who can't spare a few KB to a MB or two? But either way it adds up, and its annoying.

I've poked around online, and while not as robust and full featured as symbolic linking in a unix like environment, the incarnation of symlinks that works under Windows 7 appear to meet my requirements nicely. That is, put a friendly little sign at C:/Program Files, and C:/Program Files (x86) that says "Data, That'away!" and happily sends all calls to "C:/Programs Files/SomeStupidTool" to "D:/HahaThisIsDDriveAndYouDontKnowIt/SomeStuipdTool"

In theory this should be simple. Copy data out of the two program folders, plop it in two new folders on another drive to serve as their respective new storage homes, delete the two folders from C, create the symlinked folders with the proper names, and let any other annoying tool install itself to the "C" drive if it wants too, and I go back to not worrying about default install locations.


But there is a catch. I can't delete, move, rename, or do anything to Program Files or Program Files (x86). A little more googling suggests ways of changing premissions to strip these folders of those protections, but they all seem to be lacking the one key detail that I really want,... Putting those protections back when I'm done fiddling with them.


So, advice? Suggestions? Better Google-fu? Anyone have spare torches, pitchforks, and a list of addresses of programmers who write installers that only install to C Drive?
(Any idea of when "Windows We Finally Accepted Unix Had the Right Idea" Edition comes out?)
Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.

Sponsor:

#2 way2lazy2care   Members   -  Reputation: 782

Posted 14 July 2011 - 08:30 PM

I have no solutions for you, but I wanted to let you know that I'm glad you ran into these problems, because I would no doubt run into the same problems in the next couple months if I make a new computer.

#3 fastcall22   Crossbones+   -  Reputation: 4477

Posted 14 July 2011 - 08:52 PM

I've poked around online, and while not as robust and full featured as symbolic linking in a unix like environment, the incarnation of symlinks that works under Windows 7 appear to meet my requirements nicely. That is, put a friendly little sign at C:/Program Files, and C:/Program Files (x86) that says "Data, That'away!" and happily sends all calls to "C:/Programs Files/SomeStupidTool" to "D:/HahaThisIsDDriveAndYouDontKnowIt/SomeStuipdTool"

In theory this should be simple. Copy data out of the two program folders, plop it in two new folders on another drive to serve as their respective new storage homes, delete the two folders from C, create the symlinked folders with the proper names, and let any other annoying tool install itself to the "C" drive if it wants too, and I go back to not worrying about default install locations.


This sounds like the best idea. Though, I'd mirror the directory structure such that C:\"Program Files"\SomeStupidTool links to D:\"Program Files"\SomeStupidTool. (I'd also recommend getting LinkShellExtension to make links from the explorer context menu!)

But there is a catch. I can't delete, move, rename, or do anything to Program Files or Program Files (x86). A little more googling suggests ways of changing premissions to strip these folders of those protections, but they all seem to be lacking the one key detail that I really want,... Putting those protections back when I'm done fiddling with them.


At most, you will only need to change permissions on a few folders inside Program Files... If you can obtain elevated privileges, then you can edit the security tab such that regular users have access read/write to specific folders.
c3RhdGljIGNoYXIgeW91cl9tb21bMVVMTCA8PCA2NF07CnNwcmludGYoeW91cl9tb20sICJpcyBmYXQiKTs=

#4 DvDmanDT   GDNet+   -  Reputation: 1004

Posted 15 July 2011 - 12:10 AM

You should be able to do what you want to do from the Windows installation media. A friend did it using that at least (though he changed the C:\Users to point to another disk).

#5 samoth   Crossbones+   -  Reputation: 5039

Posted 15 July 2011 - 02:06 AM

The question you should ask before "why are there so many bad installers" is why do we need installers at all. The answer is because the people who made the key decisions 25 years ago were terribly shortsighted, but as long as it kind of works, nobody sees a reason to change anything. Plus, it is terribly bad luck to tell your software developers that what you told them to do for two decades was wrong, and it would be entirely out of the scope if software that is 15-20 years old stopped working at some point.
Having a central point of failure and central point of congestion (Windows registry) and not explicitly versioned shared objects which are overwritten with every program install were two of the most stupid design decisions in the history of computing, if you ask me. 3/4 of all end user problems during the last 2 decades came from these two things.

About Google and Adobe etc. installing their crap just where you want (and installing what they want, too, without asking), this is easily answered: There is a massive misunderstanding from your side. You believe because you paid money for the computer, you are the owner. That's of course fundamentally wrong.
Google, Adobe, and Gigabyte own your computer, and as a user you are too stupid to decide what's good for you anyway. Therefore, they not only have every right of installing programs where they want, and secretly installing services that run at startup and send data over the internet, it is even their civil duty to protect you from yourself.

As a solution to your problem, I recommend junctions (you can also mount drives directly in folders, but junctions are nicer, more flexible, and work on more systems). Over shortcuts, junctions have the advantage of being transparent and undetectable for programs in normal operation (they could detect them, but practically no program does). Junctions are a feature of NTFS that was secretly available since Windows 2000, although no tool of creating them was shipped prior to Vista. However, you can download Sysinternals Junction from Microsoft, which does just what you need.
Note that a junction works much more like a (possibly cross-drive) hardlink under Unix than like a traditional Windows shortcut, so you will want to use a little care with them (Deleting a folder in Explorer, as you know, first deletes all files inside it and then removes the folder. But a junction does not merely point at another folder, it basically is the original folder, so naively deleting a junction with Explorer deletes the original files which the junction points at!).

#6 gavco98   Members   -  Reputation: 372

Posted 15 July 2011 - 02:36 AM

Am I not right in thinking that as of Windows 7 - microsoft is now actively encouraging programmers to install applications to the Program Files folder? I believe only applications installed in Program Files can access or modify resources within their own folder, if they are installed to, say, C:\MyApp then the MyApp folder would be read only, and the user would receive a permission prompt if the application decides to write to this folder.

The solution is therefore to move the location of the Program Files and Users folders, thusly: http://tuts4tech.net/2009/08/05/windows-7-move-the-users-and-program-files-directories-to-a-different-partition/


As Samoth points out - why do we have installers at all (or more exactly - why must they ask us questions at all). I'm a big fan of Joel Spolsky's blog, and one of the things he talks about is that programmers should make the decision, and not ask the user unnecessary questions. 99.9% of users do not care where the application installs to - so why ask every user, just for the 0.1% that do want to be different? A good installer should just install the application, without hassling the user.

I used to work for a company producing software for oil rigs. All our software came with a wise script installer, containing the usual wizard - confirm you want to install - accept license - select location - confirm install. I then pointed out to them that our software was going to be installed by our own engineers, and that if it was installed anywhere but the default location, it wouldn't work. 3 of the 4 screens were therefore completely irrelevant, and were only ever added because that is the standard way of doing things.

No one had ever bothered to sit down and think about it, but instead just accepted the norm. You will find this a lot, particularly in IT. The companies that really stand out, are the ones that break from this norm and actually think about what they are doing, Apple is a great example of this.
Gavin Coates
IT Engineer / Web Developer / Aviation Consultant
[ Taxiway Alpha ] [ Personal Home Page ]

#7 samoth   Crossbones+   -  Reputation: 5039

Posted 15 July 2011 - 05:14 AM

The single correct way to install software in my opinion would be to not install it at all. Installing in this case would mean to copy the folder containing the program from the CDROM to some location on your harddisk or unpacking a zip file that you have downloaded.

Shared libraries are in the same folder as the executable from where the OS will load them. Only libraries that are not found there (e.g. the system-internal libraries) are loaded from the system folder. ---> every program has the correct versions of all shared libraries, no tampering with operating system files needed.

If a user wants to take advantage of the "shared" part of shared library, he can copy the shared libraries to the system folder, saving disk space and memory pages. Nobody except the user the file manager runs under has write access to this location. If you will, this could be done as "extended install process" by telling the file manager to do these moves if an "automatic install" is really wanted, but still it would need to go through the "special authority", you cannot just copy any file to the system.

Each distinct major version of each shared library must have a unique (maybe monotonously incrementing) serial number in its filename and bears a signature with a revision number. Shared objects with the same serial number in their name must be binary compatible to earlier versions with the same serial number in the filename. Thus, any foo.1234.dll is compatible with any previous foo.1234.dll, but not necessarily with foo.1235.dll or any other library.
The file manager verifies the signature of each object copied to the system folder. If an object with the same name exists, it will be overwritten only if the signature of the new object comes from the same institution and has a newer release number.

---> all DLLs have guarantee integrity and binary compatibility, but no complex trust chain or "official signatures" are strictly necessary (though possible).
The programmer of Foo-Office might supply foo-library which could be shared with Foo-Paint. He can use his own (self-made) signature key for that. Since no other program loads this library, the worst thing to happen in case Foo has malicious intent would be a malicious library in the system that is only used by Foo programs.
The system will not overwrite any other object because the signature owners won't work out. It will not overwrite Foo's objects with a malicious third party's libraries either. Foo can also provide a copy of the CRT library, but cannot replace the system object with a tampered one, since again the comparison wouldn't work out. If Foo maliciously copies a (not yet existent) bar-lib to the system hoping to compromise a future Bar program that the user might install, this will apparently work. However, he will still not be successful. By default, the Bar program uses the libraries in its program folder, and if the user copies these to the system, the signature check will fail (since Bar will have used his own signature key). Many different programs can have many non-compatible versions of a library at the same time, upgrades/fixes on a library automatically work for all programs using the same version.

Settings are stored similarly to how it's done on Unix-like systems, in a file with the program's name inside a sub-directory of the per-user home directory. If a program needs "global" settings, they go into the "all users" config dir. The system has its own config somewhere (e.g. for startup files etc.), which is owned by the "system user".
---> no registry needed, no tampering with the registry needed, and indeed no easy tampering possible, no installer needed.

Well, enough dreaming... we'll probably never see something as easy as that.

#8 Yann L   Moderators   -  Reputation: 1798

Posted 15 July 2011 - 10:29 AM

About Google and Adobe etc. installing their crap just where you want (and installing what they want, too, without asking), this is easily answered: There is a massive misunderstanding from your side. You believe because you paid money for the computer, you are the owner. That's of course fundamentally wrong.
Google, Adobe, and Gigabyte own your computer, and as a user you are too stupid to decide what's good for you anyway. Therefore, they not only have every right of installing programs where they want, and secretly installing services that run at startup and send data over the internet, it is even their civil duty to protect you from yourself.

Sarcasm aside, matter of fact is that install location is an irrelevant technical detail that will overwhelm 99% of all non-technical users. It is also a way to phenomenally screw up an install when you don't know what you're doing (keep in mind that we technically literate users are a small minority). Why increase workload on support lines and make your main user base confused/unhappy just to please maybe 0.1% of power users ? Not asking for install location makes indeed perfect sense for an installer. You wouldn't believe how many people try to install software on a DVD drive or USB key without even realizing it.

What doesn't make perfect sense is the whole installer framework on OS side. It should not be the reponsability of the installer to decide on install location. All that should be handled transparently by the OS, configurable through policies for power users and/or administrators.

As a sidenote, this problem is much much worse on Linux. It is almost guaranteed (and even accepted practice) that even the smallest piece of software can distribute its files to more or less fixed locations all around your file system as soon as you do a make install. OSX on the other hand, takes a completely opposite approach. An application is a sealed and self contained package that can be moved around at will.

Am I not right in thinking that as of Windows 7 - microsoft is now actively encouraging programmers to install applications to the Program Files folder? I believe only applications installed in Program Files can access or modify resources within their own folder, if they are installed to, say, C:\MyApp then the MyApp folder would be read only, and the user would receive a permission prompt if the application decides to write to this folder.

MS has indeed created strict guidelines on where code and user files should go. That is a good thing. But unfortunately not all developers adhere to these guideline, and MS needed to provide backwards compatibility. Basically, no one should ever write to Program Files, except for install, update or uninstall. In normal operation, this location should be strictly read only. And that is indeed enforced by Windows, if you tell it that your software adheres to the guidelines (using the application manifest). If you don't let it know that you're a good boy, then Windows will run your app as legacy code, virtualizing part of the filesystem. Your code may think it writes to Program Files, but it actually doesn't.

The single correct way to install software in my opinion would be to not install it at all. Installing in this case would mean to copy the folder containing the program from the CDROM to some location on your harddisk or unpacking a zip file that you have downloaded.

Shared libraries are in the same folder as the executable from where the OS will load them. Only libraries that are not found there (e.g. the system-internal libraries) are loaded from the system folder. ---> every program has the correct versions of all shared libraries, no tampering with operating system files needed.

That's basically the way OSX does it.

#9 JoeCooper   Members   -  Reputation: 338

Posted 15 July 2011 - 10:43 AM

OS X does that and it's wonderful (I love it, anyway), but OS X also has installation packages, and I've made one before. This was to set up a daemon which needed to enact some system-level configuration change and I decided against putting this onto users (nevermind why).

To the OP:

This isn't super well known, nor does it directly address the installer issue, but... Windows actually lets you map folders to volumes just as UNIX does. Windows 2000 (NT 5) did this and I assume this feature hasn't been removed.

So you could, for example, mount a partition on a different drive altogether to "C:\Program Files" with a little legwork (file shuffling).

In any case, I had a software that had to be installed, and secondary packages which had to place files in the first software's program folders. Mindful of how annoying it is when you can't specify, I did take the effort to use the Windows resource GUIDs or whatever they're called (can't remember the jargon) so that you could install the base program wherever and the secondaries would be able to find their place. MSI and WiX are winners.

#10 BeanDog   Members   -  Reputation: 1063

Posted 15 July 2011 - 04:48 PM

Symbolic links to other drives are remarkably easy to set up on Windows. I use this on a regular basis, as I share your small SSD/large HDD setup. You create them by opening a command prompt in administrator mode and using mklink /D

http://en.wikipedia.org/wiki/NTFS_symbolic_link

~BenDilts( void );

Lucidchart: Online Flow Chart Software; Lucidpress: Digital Publishing Software


#11 Luckless   Crossbones+   -  Reputation: 1892

Posted 15 July 2011 - 05:32 PM

Symbolic links to other drives are remarkably easy to set up on Windows. I use this on a regular basis, as I share your small SSD/large HDD setup. You create them by opening a command prompt in administrator mode and using mklink /D

http://en.wikipedia....S_symbolic_link


Oh sure, the links are easy enough to make.


Creating the links to replace "C:\Program Files" and related folders is the hard part as windows does not play nice when you want to touch those folders.
Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.

#12 zedz   Members   -  Reputation: 291

Posted 15 July 2011 - 09:13 PM

The single correct way to install software in my opinion would be to not install it at all. Installing in this case would mean to copy the folder containing the program from the CDROM to some location on your harddisk or unpacking a zip file that you have downloaded.
...
...

Basically this is what Ive said for years (decades) I reckon I could find a post of mine here from >10 years ago saying this.

MS cocked up huge with the way they designed it, true it sort of made sense back in the day (with limited HD/mem space), like filenames being 8.3 characters long
but it was obvious from the word go mem/HD space will increase at a much faster rate than program size would. And it has turned out thus.
That bad choice has come back and bitten MS in the ass, its part of the reason apple OS's have the reputation of just working, they made the smart choice.
Even nowadays I occasionally see dll hell trying to run an app. gahhh, things should just work!

#13 Don Carnage   Members   -  Reputation: 636

Posted 18 July 2011 - 10:43 AM

Yeah, on Win7 I guess you use symlinks (mklink), mounted volumes and unattended setup to manipulate which stuff gets placed where. Or you could try changing the default "Program Files" paths in the registry like in this guide:

http://www.sevenforums.com/tutorials/39689-program-files-directory-change-default-installs.html

Being computer literates, we should all be able to figure these things out :P
It is I, the spectaculous Don Karnage! My bloodthirsty horde is on an intercept course with you. We will be shooting you and looting you in precisely... Ten minutes. Felicitations!

#14 BeanDog   Members   -  Reputation: 1063

Posted 18 July 2011 - 10:46 AM

Oh sure, the links are easy enough to make.

Creating the links to replace "C:\Program Files" and related folders is the hard part as windows does not play nice when you want to touch those folders.

When I've done this, my workflow looks like this:
  • Install 12GB program to C:\Program Files
  • Move 12GB directory to D:\Whatever
  • Run mklink to link it back to its original location
As long as you have at least enough space to install your programs one at a time, it works like a charm.

~BenDilts( void );

Lucidchart: Online Flow Chart Software; Lucidpress: Digital Publishing Software


#15 Luckless   Crossbones+   -  Reputation: 1892

Posted 18 July 2011 - 08:55 PM


Oh sure, the links are easy enough to make.

Creating the links to replace "C:\Program Files" and related folders is the hard part as windows does not play nice when you want to touch those folders.

When I've done this, my workflow looks like this:
  • Install 12GB program to C:\Program Files
  • Move 12GB directory to D:\Whatever
  • Run mklink to link it back to its original location
As long as you have at least enough space to install your programs one at a time, it works like a charm.


I had been trying to find a way to just use a single link for the entire program files folder while keeping all of its protections in place, but I think your way would be the easiest. Maybe just work out a little script to grab anything new and move it over.

Thanks.
Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.

#16 Tachikoma   Members   -  Reputation: 552

Posted 18 July 2011 - 10:35 PM

Sarcasm aside, matter of fact is that install location is an irrelevant technical detail that will overwhelm 99% of all non-technical users. It is also a way to phenomenally screw up an install when you don't know what you're doing (keep in mind that we technically literate users are a small minority). Why increase workload on support lines and make your main user base confused/unhappy just to please maybe 0.1% of power users ? Not asking for install location makes indeed perfect sense for an installer. You wouldn't believe how many people try to install software on a DVD drive or USB key without even realizing it.

What doesn't make perfect sense is the whole installer framework on OS side. It should not be the reponsability of the installer to decide on install location. All that should be handled transparently by the OS, configurable through policies for power users and/or administrators.

Although there could be good reasons for specifying a different install path, especially if we are talking about products that is intended for advanced users or professionals. But for the most part I agree. The problem with Google and Adobe products is that their deployment strategy does not follow recommendations outlined by Microsoft. For instance, Chrome is very minimal with the install procedure, but Chrome installs itself under the user's profile directory, as opposed to the Program Files folder as expected. Worse still, some of these applications leave orphaned files (after patches, etc) that can accumulate a few hundred megabytes.

On a side note, I have to say the Windows Installer system is actually not bad, and works quite well when used properly by the vendor. Unfortunately, it's a bit of a PITA to work with. I only used WiX, which is powerful, but I wish there was a more straightforward system to build MSI deployment packages. If anyone has suggestions, I'd love to hear about them.
Latest project: Sideways Racing on the iPad

#17 Luckless   Crossbones+   -  Reputation: 1892

Posted 19 July 2011 - 07:02 AM

But really, what is wrong with having an installer that works like this:

1. When launched you are given a page that details WHAT the program is.
"Foobar Tool Set
An aid to all your Foobar needs"

2. Have two buttons at the bottom: A) Advanced Install, "For Advanced User Only", B) Automatic Install, "Handles all the install options for you."


And look at that, you have magically avoided all the issues with an installer being 'hard'. It tells the user WHAT they are trying to install so that they know this is actually what they wanted, and magically gives users who need to install stuff else where the option to do so. Anyone who can still manage to screw that up simply shouldn't be allowed on a computer in the first place.
Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS