It was my understanding that temporary files were destroyed during the InstallFinalize action. Knowing that, I added a folder called "Scripts" in Windows Volume/Temporary. In it, I added some files used by the installerclass, which runs between InstallExecute and InstallFinalize. And so I build and run the setup. If an error occurs in the installerclass, the Scripts folder gets removed. If the setup is a success, the folder stays there with all the files. Well that's odd. It's located in C:\Users\myusername\AppData\Local\Temp, along with some other files created by the setup such as the AI Resource Cleaner text file :
In the Files And Folders window, on the Scripts folder, I even tried check the box "Remove Folder" and set the Operation to Always. But the folder still remains there on success.# 2013-05-17 @12:22:34 [PID=80808|Thread=73240] | OnAiRemoveFiles start.
# 2013-05-17 @12:22:34 [PID=80808|Thread=73240] | CollectRemoveFileData start.
# 2013-05-17 @12:22:34 [PID=80808|Thread=73240] | CollectRemoveFileData end.
# 2013-05-17 @12:22:34 [PID=80808|Thread=73240] | Actually files removal begin.
# 2013-05-17 @12:22:34 [PID=80808|Thread=73240] | Removing folder: C:\Users\myusername\AppData\Local\Temp\Scripts\
# 2013-05-17 @12:22:34 [PID=80808|Thread=73240] | Actually files removal end.
# 2013-05-17 @12:22:34 [PID=80808|Thread=73240] | OnAiRemoveFiles end.
# 2013-05-17 @12:22:35 [PID=80808|Thread=73240] | Using save file name: C:\Users\myusername\AppData\Local\Temp\AIBB_80808.tmp
Long story short, behind-the-scene scripts would get exposed to the customer and if I run the setup a 2nd time then it will use the old files instead of the new ones (and yes, the "Overwrite only if the existing files are older" box is checked by default and I left it checked).
Any idea why this is happening and how to remove the folder? I'm expecting creating an inline VB Script custom action should do the trick, but I suppose there should be some temporary file removal action/option.
PS : I might not be able to respond quickly, so don't be surprised if that happens.
FOLLOW US
Get the latest news in Application Packaging