I have a requirement that for an uninstall, all files for the product are 
removed. Not only do I need to delete files installed by my installer, but I 
need to delete any other file that may have showed up while the product was 
being used. So, I have a custom action that deletes remaining files after the 
uninstall removes files.

On Vista, I have problems with deleting files from the Program Files folder. 
During the install I get the UAC dialog where I click Allow. In the log, I get 
an access denied message.:

System.UnauthorizedAccessException: Access to the path 'app.config' is denied.
   at System.IO.Directory.DeleteHelper(String fullPath, String userPath, 
Boolean recursive)
   at System.IO.Directory.Delete(String fullPath, String userPath, Boolean 
recursive)
   at Microsoft.VisualBasic.FileIO.FileSystem.DeleteDirectoryInternal(String 
directory, DeleteDirectoryOption onDirectoryNotEmpty, UIOptionInternal showUI, 
RecycleOption recycle, UICancelOption onUserCancel)
   at Microsoft.VisualBasic.MyServices.FileSystemProxy.DeleteDirectory(String 
directory, DeleteDirectoryOption onDirectoryNotEmpty)
   at WEdge.Client.Setup.CA.InstallSequenceCustomActions.RemoveFolder(String 
folderToRemove, Session session)

The custom action is VB and is using the following:
My.Computer.FileSystem.DeleteDirectory(folderToRemove, 
FileIO.DeleteDirectoryOption.DeleteAllContents)

If I start a CMD prompt using Run As Administrator and then run the uninstall 
from the command line, it works. However, I can't find a way to use Run As for 
the control panel or Programs and Features.

Any suggestions?

John Harvey
Developer, Warfighter's Edge (WEdge)
HQ USAFA/DFEI
2354 Fairchild Drive, Suite 4H43
USAF Academy, CO 80840-1344
(719) 333-0626
john.har...@wedge.hpc.mil

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to