Custom Action "NOT Installed" not working
I have a custom action setup in my MST which runs an exe after the Install finalize & copies few XML files in the Users AppDataFolder. I want my package to uninstall the XML files along with the package but its leaving those XML files behind.
In-Script Execution = Immediate Execution
Execution Scheduling = Always execute
Install Exec Sequence = After InstallFinalize
Intall Exec Condition = NOT Installed (Do i need to "" NOT Installed?)
In-Script Execution = Immediate Execution
Execution Scheduling = Always execute
Install Exec Sequence = After InstallFinalize
Intall Exec Condition = NOT Installed (Do i need to "" NOT Installed?)
0 Comments
[ + ] Show comments
Answers (10)
Please log in to answer
Posted by:
stabish
14 years ago
Posted by:
SpiritUA
14 years ago
Posted by:
stabish
14 years ago
Posted by:
anonymous_9363
14 years ago
I would abandon DOS batch script and find a VBS which uses a function to delete files in a folder whose name is passed to the function. That way, you can build in proper error-trapping (e.g. a test that the files were actually deleted) and avoid duplicate code. Start at http://www.computerperformance.co.uk which has loads of script samples.
Posted by:
pjgeutjens
14 years ago
I have a custom action setup in my MST which runs an exe after the Install finalize & copies few XML files in the Users AppDataFolder. I want my package to uninstall the XML files along with the package but its leaving those XML files behind.
I'm a bit confused, do you want to cleanup those XML files during installation or during uninstall of your package? Also, the CA you mention, does it take care of the installation or removal of said files?
Remember, any files you copy in a CA in an MSI, you'll have to make a matching CA for cleanup.
Posted by:
stabish
14 years ago
Posted by:
anonymous_9363
14 years ago
Posted by:
pjgeutjens
14 years ago
ok,
now, like I added in my previous post, you'll have to add a matching CA to cleanup your file copies.
Another point is, if you want to copy files to the user profile for each user that logs in and uses your application, you'll want to look into Active Setup or Advertisement.
You would then have to write a script (let's say VBS) for a CA that, at uninstall time, runs through all the User Profiles on the machine and deletes any XML files that were copied. This CA would then be scheduled with a REMOVE ~="ALL" condition, so it only runs during uninstallation of your package.
Hope this helps. [:)]
PJ
EDIT
What Ian says is correct if we're talking cleanup for ONE user. IMHO for multi-user cleanup, things get more complicated...
now, like I added in my previous post, you'll have to add a matching CA to cleanup your file copies.
Another point is, if you want to copy files to the user profile for each user that logs in and uses your application, you'll want to look into Active Setup or Advertisement.
You would then have to write a script (let's say VBS) for a CA that, at uninstall time, runs through all the User Profiles on the machine and deletes any XML files that were copied. This CA would then be scheduled with a REMOVE ~="ALL" condition, so it only runs during uninstallation of your package.
Hope this helps. [:)]
PJ
EDIT
Don't bother with a CA. Use the RemoveFile table.You can remove folders with that table. Check out MSDN for details.
What Ian says is correct if we're talking cleanup for ONE user. IMHO for multi-user cleanup, things get more complicated...
Posted by:
stabish
14 years ago
Thank you very much pjgeutjens for the feedback. I am actually using an ActiveSetup to copy the files for all users & yes i can create another custom action & call it with REMOVE=ALL condititon but i would like to play with RemoveFile Table & see if i can accomplish this instead of using a CA. Trying to find out what are some values for the
Removefile
Filekey=?
Component=COMPONENT1
FileName=abcXML
DirProperty=?
InstallMode=?
Filekey=?
Component=COMPONENT1
FileName=abcXML
DirProperty=?
InstallMode=?
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.