/build/static/layout/Breadcrumb_cap_w.png

Delete specified file types on every start or exit

I have an application that stores all it's user files in %program files%\app folder. Users can backup to another folder, but the user files are left in the app folder as well. As I have roaming users, this will be a problem. Is it possible to set the MSI to self-repair so that it will delete certain files/folders on app launch, or exit? Or is this not achievable within the MSI? If so, I guess I'd have to point the shortcut at a vbscript (or similar) which will tidy files, then launch the target app.

Any suggestions are appreciated.

0 Comments   [ + ] Show comments

Answers (1)

Posted by: nmi 19 years ago
Orange Belt
0
One way might be to run your application from a shortcut rather than the original exe file. This shortcut could point to a batch file that :

a) Runs the programme's .exe file
b) Deletes the files/folders you require
c) Exits batch file

This has the potentially unwanted side affect of an MSDOS box appearing while the app is running, unless you coded it in VBscript or similar.

Another solution might be to have your MSI create an entry in the Run key of the registry (HKLM\Software\Microsoft\Windows\CurrentVersion\Run) which runs a script to clean up the folder.

HTH

nmi
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ