SelfDel plug-in: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
Line 15: Line 15:
=== "del" DLL function ===
=== "del" DLL function ===
<highlight-nsis>
<highlight-nsis>
SelfDel::del [/RMDIR] </highlight-nsis>
SelfDel::del [/RMDIR] [/REBOOT] </highlight-nsis>
: Creates remote thread in the hidden Windows Explorer process, it waits parent process to exit and deletes it's file.
: Creates remote thread in the hidden Windows Explorer process, it waits parent process to exit and deletes it's file.
; RMDIR
; RMDIR
: if exe' directory is empty after file deletion, removes directory as well with this option.
: if exe directory is empty after file deletion, removes directory as well with this option.
; REBOOT (added by Afrow UK)
: reboots the machine after installer deletion.


== Example ==
== Example ==

Revision as of 11:08, 10 August 2011

Author: Takhir (talk, contrib)


Plug-in for setup in place deletion without exe copy or reboot.

Links

Download:
SelfDel.zip (25 KB)

Description

Plug-in launches hidden Window Explorer, it waits installer (uninstaller) to finish and deletes exe. Optionaly removes exe' directory. After this Explorer exits as well.

Now works on x64 (Vista/7) - Afrow UK; 17th July 2011

Syntax

"del" DLL function

SelfDel::del [/RMDIR] [/REBOOT]
Creates remote thread in the hidden Windows Explorer process, it waits parent process to exit and deletes it's file.
RMDIR
if exe directory is empty after file deletion, removes directory as well with this option.
REBOOT (added by Afrow UK)
reboots the machine after installer deletion.

Example

Setup deletion:

Function .onInstSuccess
 
  SelfDel::del

FunctionEnd