installer - Delete a file AFTER installation in InnoSetup -
i need delete files after installation finishes.
i using [run] section call cmd delete files wanted improve deletions using innosetup code , not batch i've seen [installdelete] section delete files before [run] section so... there can delete files after [run] section?
here script:
#define installername "virtualbox-4.2.16-r86992-multiarch_amd64.msi" #define extensionname "oracle_vm_virtualbox_extension_pack-4.2.16-86992.vbox-extpack" [setup] appname=virtualbox blah blah blah... blah blah blah... [files] source: {tmp}\*; destdir: {tmp}; flags: deleteafterinstall recursesubdirs createallsubdirs ignoreversion [run] filename: {tmp}\{#installername}; parameters: "/passive /norestart addlocal=vboxapplication installdir=""{app}"""; statusmsg: instalando virtualbox...; flags: shellexec runhidden waituntilterminated filename: {tmp}\xml.exe; parameters: "ed --inplace -n n=""http://www.innotek.de/virtualbox-settings"" --update ""//n:extradataitem[@name='gui/updatedate']/@value"" --value never ""{%userprofile}\.virtualbox\virtualbox.xml"""; statusmsg: instalando virtualbox...; flags: runhidden waituntilterminated filename: {app}\vboxmanage.exe; parameters: "extpack install --replace ""{tmp}\{#extensionname}"""; statusmsg: instalando extension pack...; flags: runhidden waituntilterminated filename: {app}\virtualbox.exe; description: {cm:launchprogram,virtualbox}; flags: shellexec postinstall unchecked skipifsilent nowait [installdelete] name: {commondesktop}\oracle vm virtualbox.lnk; type: files name: {commonstartmenu}\programs\oracle vm virtualbox; type: filesandordirs
if you're trying delete temporary files (eg. needed subinstall):
anything install {tmp}
automatically deleted @ end of install.
if cant' install {tmp}
reason can use deleteafterinstall
flag on [files]
entry.
if you're trying delete files created subinstall, should contact vendors or check documentation , see if there's command line parameter can pass suppress installation of item in first place. there should optional things desktop icons.
Comments
Post a Comment