- NSIS Discussion
- Self-destruction?
Archive: Self-destruction?
hongsj
24th September 2001 08:45 UTC
Self-destruction?
Hi everyone~
i'm novice at programing or languge stuff.
and I like to make Self-Destructioning Install file.
(Install and delete itself)
do you have any experience?
plz, let me know.
I wish NSIS team make a option to makensis.exe something like
/selfkill , in future release...:D
TIA, and sorry for my poor English.
= CoffeeGhost =
Kaboon
24th September 2001 15:09 UTC
I don't think that it is possible. But why do you want to do this anyway? :confused:
hongsj
24th September 2001 15:49 UTC
I dont like to leave installer on user's hdd.
cause it's some kind of private contents.
I think it's possible, but it's too difficult and dizy stuff to me.
(make copy to temp, run that, delete orginal leave xxx.bat del all)
but i wish, future or other release of NSIS have
a password protection or self-destruction. :)
= CoffeeGhost =
Gonzotek
25th September 2001 00:13 UTC
Your situation may be special, but it is generally a bad idea for installers to self-destruct. Here's a possible technique you can use to workaround:
First prepare a "Self-Destruct" temporary NSIS program. Write a script that starts by reading from a specific spot in the registry, this will be the location of your installer. Then tell it to delete the string you just read.
In your real installer, write the installer directory and name to the registry in the main section of your script. Include the pre-compiled "Self-Destruct" installer in your script and extract it to temp, then run it at the end of your script.
-=G=-
Repzilon
25th September 2001 01:10 UTC
Sorry, it is impossible to (executable) files to commit suicide (self-destruct) under Windows OSes.
hongsj
25th September 2001 02:33 UTC
Thanks a lot, Gonzoek.
probably, my head will be overheat, today :)
also thanks, Repzion.
but maybe it can possible by installer in installer,
or making something like batch file to delete installer,
or combination of both.
welcome any new idea
= CoffeeGhost =
DuaneJeffers
25th September 2001 03:52 UTC
Here try this:
After the Installer is created ...
Section Uninstall
;Uninstaller stuff
Section end
Section -post
;post install
Section End
Function .onInstSuccess
Delete $EXEDIR\exeinstaller.exe
FunctionEnd
-Duane
P.s. Windows DOES have a way for EXEs to delete them selves or an Uninstaller (Not the NSIS uninstallers) wouldn't work.
hongsj
25th September 2001 06:16 UTC
Hi DuaneJeffers
I'm agree, but unfortunately that was not worked.
and finally I made 3 seperate nsi.
#1 for extract #2 & #3 to temp dir and excute #3,
#2 for pure installing my apps &
#3 for excute #2 and delete #1 & #2.
(#3 remains in temp dir. (but I dont care.))
It's really dirty way :D
grateful to all of you
= CoffeeGhost =
Kreft
10th October 2001 13:51 UTC
.bat
wouldnt it be easier to try and write a batch file to do all this dirty work?