How to Compile an Application So that the Files in Application Folder are Delete-Protected
-
Is there a way to compile an application so that the files included in the application folder cannot be delelted unless the user uninstalls the program? Or, at least, is there a way to protect certain files from being deleted that may be essential to the program's operation?
-
Is there a way to compile an application so that the files included in the application folder cannot be delelted unless the user uninstalls the program? Or, at least, is there a way to protect certain files from being deleted that may be essential to the program's operation?
My idea would be to NTFS file permissions on those files that need protecting. Set it up so that only the administrator has delete privs. All others would have read and execute? How to do this from code you would need to do some googling.
-
Is there a way to compile an application so that the files included in the application folder cannot be delelted unless the user uninstalls the program? Or, at least, is there a way to protect certain files from being deleted that may be essential to the program's operation?
If the user installed your application using Windows Installer (i.e., your Setup project), then they can delete all the files that they want in the Program Files area as long as you follow one simple rule: install the shortcuts to the application through your Setup project and NOT through programmatic means. If you do this, then that shortcut the user clicks on the desktop or in the start menu actually starts a process that checks the manifest for their installed program. If any "Vital" files do not exist, then Windows Installer will automagically replace them! Isn't that nice.... "we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty