/build/static/layout/Breadcrumb_cap_w.png

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?)

0 Comments   [ + ] Show comments

Answers (10)

Posted by: stabish 14 years ago
Orange Belt
0
I created a BATCH file to run the del command @ uninstall. Just wondering instead of VB can a write a batch file to serach the all user profile & then delete the xml files?

%USERNAME% & %USERPROFILE% variables only delete the files for the user who is logged on.
Posted by: stabish 14 years ago
Orange Belt
0
Gotcha
cmd /c "c: & cd c:\docume~1 & del abc.xml /s"
Posted by: SpiritUA 14 years ago
Yellow Belt
0

Gotcha
cmd /c "c: & cd c:\docume~1 & del abc.xml /s"


And if "Documents and settings" not located in disc C:\
AND
Importantly you are delete all abc.xml files from all subdirectories, if any programme uses some file name.
Posted by: stabish 14 years ago
Orange Belt
0
How can i rescript this to delete the files from User's Appdata & LocalAppData?
Posted by: anonymous_9363 14 years ago
Red Belt
0
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
Red Belt
0
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
Orange Belt
0
I want to clean them up during Uninstall. Yea the Install takes care of the file but its only the uninstall which is leaving the files behind
Posted by: anonymous_9363 14 years ago
Red Belt
0
Don't bother with a CA. Use the RemoveFile table.You can remove folders with that table. Check out MSDN for details.
Posted by: pjgeutjens 14 years ago
Red Belt
0
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

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
Orange Belt
0
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=?
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