Live data from Hacker News

Any sufficiently advanced uninstaller is indistinguishable from malware

devblogs.microsoft.com

21–30 of 556 posts

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#23

interesting investigation and js. Though I'm wondering why does windows rely on the software to uninstall itself?

historically all windows software has either been unzipped into a folder or installed using an installer created by the vendor, so as a result the vendor has to provide their own uninstaller too. uninstallers are complex enough that the OS can't completely take their place, though Windows has shipped with an install/uninstall framework called MSI for a long time.

Since Windows 2000, to be precise.

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#25
post #7

...or maybe Windows should just offer an API for marking a file for deletion once it's not in use anymore (I understand unlink semantics may not be possible, but that's not what my suggestion above is saying)

I thought I'll be the guy to point out that once again mandatory file locking is to blame, but you beat me to it.

I never digged into the question, but why is it used, what benefits did it provide over the UNIX unlink behaviour?

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#28
post #3

And today I learned that Windows supports running Javascript as shell script. huh

Malware delivered as an email with a link to a zip file containing a .js file is one of the most common methods of delivery, right behind word macros. The "map the .js extension to notepad.exe" is a common security trick with a measurable, immediate drop in malware in large orgs. You can deploy it via GPO or InTune.

Personal promotion, I built this as a better alternative:

https://github.com/technion/open_safety

Note the built in .js parser hasn't basically ever updated, if you're writing for this you're writing like you're targetting IE5.

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#29
Here's the codeproject link the code came from.

https://www.codeproject.com/Articles/17052/Self-Deleting-Exe...

> Whether they follow the licensing terms for that code I do not know.

I'm guessing they didn't ship the binary with a link pointing back to this page?

These's also another codeproject example that uses a bat file, which is fairly similar to the recommendation in the post. I guess that's the better example.

https://www.codeproject.com/Articles/4027/Writing-a-self-des...

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#30
post #3

And today I learned that Windows supports running Javascript as shell script. huh

Been using this for years. Mostly really useful. Sometimes tricky to get right since the available APIs are semi-well documented and it's JScript, which is some sort of old Internet Explorer-ish version of JavaScript. By the way, there are also HTAs, which are Microsoft HTML Applications. You can create a simple double-clickable GUI with these using only HTML and JScript.

Pretty crazy how Microsoft basically invented the Electron app as HTAs all the way back in 1999. Of course we browsers weren't as capable as they are today, but "I just want a HTML+CSS GUI" had been a solved problem for over ten years when Electron first came out.
Post reply on HN