Delete Files usage

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

Delete Files usage

Postby Ryan Lee » Wed Jul 04, 2007 5:54 pm

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:

Postby MichaelNesmith » Thu Jul 05, 2007 2:23 am

There's a help file article on this in the help file, titled setup commands preceding apply uninstall. That will help you.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

get101
Posts: 48
Joined: Wed May 16, 2007 1:58 am

Postby get101 » Thu Jul 05, 2007 6:00 pm

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

Postby Ryan Lee » Thu Jul 05, 2007 6:40 pm

Thanks, I got it working.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 154 guests