Skip to content
⌘ NSIS Forum Archive

Delete installer executable after installation

5 posts

kond#

Delete installer executable after installation

To continue setup after rebooting I create two files: install.exe and setup.exe.
Install.exe copies files (including setup.exe) from CD and restarts computer.
After rebooting setup.exe runs from $INSTDIR and finishes installation.
How can I delete setup.exe after finishing?
Now I run setup.cmd that runs and deletes setup.exe.
Is there another way?
superwan#
yes

a copyfiles setup.exe $TEMP
an execwait $temp\setup.exe

and a command "delete setup.exe" in your setup.exe

works by my installer 😉
Afrow UK#
Yes but still means you got a copy of setup.exe in $TEMP.
You should use Delete /rebootok "$EXEDIR\setup.exe" so that it is deleted on PC restart.

-Stu
Comm@nder21#
as the executable copies itself to the tempdir, just use Delete $EXEDIR\setup.exe

the problem is, that you won't really know, what the current isntaller name ist.
the user may have renamed it.