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.
Any suggestions are appreciated.
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
nmi
19 years ago
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
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.
so that the conversation will remain readable.