Live data from Hacker News

Any sufficiently advanced uninstaller is indistinguishable from malware

devblogs.microsoft.com

331–340 of 556 posts

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#331

The guys at MS are smart enough to decompile assembly but still not enough to have a proper inode-based filesystem where you can delete files that are in use.

Allowing you to have inconsistently valid data, where a file can both exist and not exist depending on who's asking, is the opposite of smart.

it is a trade off

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#332

Earlier quoted context omitted.

I see no reason not to allow this. That's why people at Microsoft made those decision and not you. The most obvious reason would be to use the executable itself to back the memory which the comment you replied to already hinted at. Instead of loading the entire executable into memory on application start, you just create some memory mapping entry. As the code executes and accesses different parts of the executable, t…

I have very little respect to people at Microsoft when it comes to technical side of things. Whenever I have to deal with their "creations" it's like they were motivated by malice, or part of their frontal cortex gone missing. > The most obvious reason would be to use the executable itself to back the memory which the comment you replied to already hinted at. Imagine that I've already read that, and I still see no re…

Most users do not want a running program to corrupt / crash on them - even if they deleted the backing exe.

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#333

Why do Windows programs need special installers/uninstallers? Why isn't this handled by Windows itself?

When the subject is Windows, and the question includes a “why,” the answer is always “for historical reasons.”

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#334
post #271

Earlier quoted context omitted.

There was a bug in some Linux driver installer that accidentally /usr, the whole thing.

EVE online's patcher once deleted boot.ini (a file configuring their launcher that they stopped needing) without checking the working directory which caused it to delete C:\Windows\system32\boot.ini which was important to booting the then current Windows version.

It's impressive how incredibly bad the code must have been for that to happen

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#335

Earlier quoted context omitted.

[flagged]

I see no reason not to allow this. That's why people at Microsoft made those decision and not you. The most obvious reason would be to use the executable itself to back the memory which the comment you replied to already hinted at. Instead of loading the entire executable into memory on application start, you just create some memory mapping entry. As the code executes and accesses different parts of the executable, t…

This is reasonable, but this does not necessarily preclude the file from being deleted from the directory.

If an open file is deleted, it's no longer enumerable in the file system. But its pages / blocks / whatever are still there on the disk, marked as used, and can back the page cache.

Once the file is closed, the filesystem notices that the blocks do not belong to a file accessible from outside, and garbage-collects the data blocks. It all closely resembles reference-counted GC.

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#336
post #324

Earlier quoted context omitted.

I see no reason not to allow this. That's why people at Microsoft made those decision and not you. The most obvious reason would be to use the executable itself to back the memory which the comment you replied to already hinted at. Instead of loading the entire executable into memory on application start, you just create some memory mapping entry. As the code executes and accesses different parts of the executable, t…

As the original comment mention, this issues doesn't exist on Linux because the FS is inode based. The file content will be removed only when the last user has been removed.

So what? Building an operating system necessarily requires making countless design decisions, trading some things for other things. Over the decades the best choices may even change as technology advances but you might be unable to change course because you have a huge number of installations and would cause a lot of issues.

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#338

Earlier quoted context omitted.

It has little to do with the filesystem. Windows has OS level locks. In the case of a running executable, the mapped memory holds a lock on the exe file to prevent deleting it. This is intentional. If it didn't hold the lock then it would be possible to delete the exe file on modern versions of Windows. Edit: since there still seems to be confusion I'll try to be clearer. On NTFS you can delete an open file. This is…

[flagged]

There’s a Raymond Chen article (or maybe it’s in his book) about people that complain “why doesn’t windows just let me do…”, and he then goes on to give several examples and show what some of the downsides are if you allowed it. This article looks similar, but I’m not sure it is[0].

The name calling and lack of actual examples shows that you probably haven’t even thought about potential downsides. I haven’t either, but it’s because I don’t really care about this particular issue. I just care enough to point out that the “mentally-challenged foot soldiers” at Microsoft may have actually run into some exploits or malicious behavior because they did “allow useful things” at one point.

[0]: https://devblogs.microsoft.com/oldnewthing/20050607-00/?p=35...

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#339

How do I uninstall Windows?

https://fedoraproject.org/wiki/Migrating_From_Microsoft_Wind...

That's not uninstalling it though. For example on Fedora I can uninstall Linux with sudo dnf remove linux, or even remove the package manager (arguably what makes Fedora: Fedora) with sudo dnf remove dnf

So not quite what I'm looking for :D

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#340
post #326

Earlier quoted context omitted.

The same way any linux distro does? Define a separate directory for program installations, that user processes cannot write to. Only program that can do so is the package manager, which other programs can call to install packages. Uninstall removes everything related to a program from this directory. > In the age of shared runtimes, auto-updaters, extension marketplaces, and JIT compilers, managing installed applicat…

>The same way any linux distro does? >Define a separate directory for program installations, that user processes cannot write to. What about /usr/local/bin? Isn't that specifically for putting non package manager binaries into?

That's more for binaries and scripts manually installed by the administrator because they weren't available in the package manager or are custom.
Post reply on HN