|
|
#1 |
|
Senior Member
Join Date: Jan 2007
Posts: 125
|
After installation, want to delete the setup.exe file
Hi All,
Our installer is just for upgrading our software, so it requires to be run in silent mode. After installing it, we do want to delete the setup file ( for example : setup.exe [outfile "setup.exe] in .nsi file). The question is how i can detect where this file (setup.exe) is? this file will be copied in some locations in hard drive. is it possible to detect this file first, then get the path of this file and delete it? |
|
|
|
|
|
#2 |
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
See NSIS manual E.1.9 GetExeName.
e.g. Function .onInstSuccess ${GetExeName} $R0 Delete /REBOOTOK $R0 FunctionEnd Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jan 2007
Posts: 125
|
Thanks, can we don't use /REBOOTOK , wanna delete it right away!
|
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
I see the same question only few lines below http://forums.winamp.com/showthread....hreadid=265448 - how to delete itself without reboot. Not tested on Vista yet..
|
|
|
|
|
|
#5 | |
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
Quote:
Anyway, it doesn't even work in silent mode. Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS Last edited by Red Wine; 9th February 2007 at 20:54. |
|
|
|
|
|
|
#6 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
Looks like I must add plug-in description to wiki with good samples
![]() I wrote earlier that in the silent mode installer not creates GUI and not calls .onGuiEnd. Last hidden section with the only line can work in both modes, but cursor on the finish page becomes 'waiting'. Finally I see that .onInstSuccess is a very simple solution Works in all modes (incl. MUI and silent). wiki archive SelfDelEdited: SelfDel plug-in page Last edited by Takhir; 10th February 2007 at 08:23. |
|
|
|
|
|
#7 |
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
Cool! .onInstSuccess works fine and also covers the posted query on the top of the thread about how to self delete a silent installer.
However the link is an empty page on wiki. Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
|
|
|
|
|
#8 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
I cannot edit post above (> 2 hours) so this is correct link http://nsis.sourceforge.net/SelfDel_plug-in
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|