Jump to content

VIPM does not uninstall files that are read-only


Daklu

Recommended Posts

This is an issue that I hadn't gotten around to bugging since I wasn't sure it was a bug. Then I discovered it as the root cause of a recent issue I had.

 

VIPM does not delete package files that have been marked read-only. This has two effects:

1. Packages receive a false uninstall. VIPM shows them as uninstalled, but the files themselves are not removed.

2. If using OpenG Package Builder scripts and the scripts are read-only prior to creating the package, they will not be deleted from the temp directory after the first install finishes. The first installation works fine but any subsequent installation attempts of packages that use the undeleted scripts will fail with no indication why. Deleting PreInstall.vi, etc. from the temp directory allows you to install the package correctly again.

 

Use case: I typically use an OGB post build script to mark my built code read-only. This prevents me from accidentally making changes to released code. The OGPB scripts will be shared among several projects and will be under source control, so they will be read-only as well.

 

Issue 1 might be able to be worked around using a PreUninstall.vi script, but I haven't tried it yet. (Is the package information, such as installation directory and installed files, available to the scripts?) Since the script files in the temp directory always have the same name, I imagine using a standard preinstall script that deletes those files from the temp directory would work around that.

 

I've attached a screenshot of the Process Monitor capture showing the error and a small test package that demonstrates the problem. The Test Package includes Pre/PostInstall and Pre/PostUninstall scripts and is installed to c:\Test Package. As each script executes an entry is made in c:\Test Package\install.log. (If anyone else installs this package, don't forget to delete the VIs from your temp directory!)

 

post-2450-1229139042_thumb.png

tp_ReadOnly_CDEF_1.0_1.ogp

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.