Delete Files usage

Got a problem you cannot solve? Try here.
Post Reply
Ryan Lee
Posts: 26
Joined: Fri Jun 29, 2007 7:11 pm

Delete Files usage

Post by Ryan Lee »

When my application runs it creates some files in the target directory (myFile1.txt and myFile2.txt). When uninstalling I want to delete those files. I am currently trying the following with no success.

Code: Select all

DEFINE REGION: Perform Uninstallation
 if Variable REMOVE equals TRUE
   Delete Files $TARGETDIR$\\myFile1.txt (when uninstalling)
   Delete Files $TARGETDIR$\\myFile2.txt (when uninstalling)
   Apply Uninstall (get result into variable SUCCESS)
   Set Variable PROGRESS to 100
 else
  .......
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

There's a help file article on this in the help file, titled setup commands preceding apply uninstall. That will help you.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
get101
Posts: 48
Joined: Wed May 16, 2007 1:58 am

Post by get101 »

It goes in as part of the install section rather than the uninstall section.

Look for this line:

Code: Select all

 Comment: TO-DO: Insert any additional install commands here
and put your delete lines there.
Ryan Lee
Posts: 26
Joined: Fri Jun 29, 2007 7:11 pm

Post by Ryan Lee »

Thanks, I got it working.
Post Reply