Automatically delete executable file

Common questions about using Actual Installer.
Post Reply
CraigO
Posts: 3
Joined: Tue Feb 12, 2013 3:28 pm

Automatically delete executable file

Post by CraigO »

Hi,

I have an executable file (created using Actual Installer) that creates a folder on the user's C: drive, then it runs an executable file (WinZip self-executing file) which unzips all of its files into the folder that was just created. After everything is unzipped, the original WinZip .exe file is located in the folder. That file is no longer necessary and is just taking up space. Is there a way to set up Actual Installer so it will delete that WinZip self-executing file after it runs? Perhaps running the WinZip self-executing file from a Temp folder which is then deleted?

Example: The user runs "SETUP.exe". It creates a folder on the C: drive, then it runs "FILES.exe" (WinZip self-executable). After the files are unzipped into the new folder, I'd like "FILES.exe" to be automatically deleted from the user's computer.

I looked through Help, but I'm new to system variables and registry. I'm not sure what to do. Any help is appreciated.

Thanks!
Leo
Site Admin
Posts: 456
Joined: Fri Jan 22, 2010 12:40 pm

Re: Automatically delete executable file

Post by Leo »

Hi CraigO,

Go to the System\Commands page and add the following command:

Code: Select all

Command: <SystemDir>\cmd.exe
Parameters: /C del /Q "<InstallDir>\file.exe"
Timing: After Installation
Leo,
Actual Installer Team
https://www.actualinstaller.com
CraigO
Posts: 3
Joined: Tue Feb 12, 2013 3:28 pm

Re: Automatically delete executable file

Post by CraigO »

Leo wrote:Hi CraigO,

Go to the System\Commands page and add the following command:

Code: Select all

Command: <SystemDir>\cmd.exe
Parameters: /C del /Q "<InstallDir>\file.exe"
Timing: After Installation
Hi Leo,

I added the command you show. I also checked the box next to "Wait until process finishes". When I ran my SETUP.exe file, the Winzip self-extractor file "FILES.exe" was deleted from the folder on the C: drive before it had a chance to extract its contents to the folder. Is there a way to tell Actual Installer to wait for the file "FILES.exe" to run before it gets deleted?

Thanks for your help.
Leo
Site Admin
Posts: 456
Joined: Fri Jan 22, 2010 12:40 pm

Re: Automatically delete executable file

Post by Leo »

Please make sure that the option 'Timing' is set to 'After Installation'.
Leo,
Actual Installer Team
https://www.actualinstaller.com
CraigO
Posts: 3
Joined: Tue Feb 12, 2013 3:28 pm

Re: Automatically delete executable file

Post by CraigO »

Hi Leo,

Yes, I had Timing set to "After Installation". I also unchecked "Wait until process finishes". In this case, FILES.exe will run and extract the files to the folder, but FILES.exe will not get deleted. (see attached image for screen shot)

When "Wait until process finishes" is checked, "FILES.exe" gets deleted before it can run.
When "Wait until process finishes" is not checked, "FILES.exe" runs, but does not get deleted after it's finished extracting the files.

Some more info...the "FILES.exe" file that I have is set to launch in Dialogs > Finish tab. The "Launch application" box is checked and set to run File: <InsallDir>\FILES.exe. Should I be launching "FILES.exe" in System > Commands instead? Perhaps I'd have better control over what runs when? Just a thought.

Also, I'm running AI version 3.8.

Thanks!
Attachments
Clipboard01.jpg
Screen shot
(58.37 KiB) Not downloaded yet
Leo
Site Admin
Posts: 456
Joined: Fri Jan 22, 2010 12:40 pm

Re: Automatically delete executable file

Post by Leo »

Yes, add this file on the System\Commands page before command to delete file.
Leo,
Actual Installer Team
https://www.actualinstaller.com
Post Reply