We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Make app undeletable

maxb
maxb asked
on
Medium Priority
402 Views
Last Modified: 2008-02-26
Hi there,
How do I lock files to make them undeletable at the file level? I saw another protection app do this (something with NTFS?)

Thanks for any pointers!
Max
Comment
Watch Question

FileSetAttr('MyFile.sys', faReadOnly or faSysFile);

FileSetAttr returns zero if the function was successful. Otherwise the return value is a Windows error code.


Shane

Author

Commented:
so where would this go on c:\test.exe ? so it can't be deleted unless its allowed (by running the app again and allowing deletion)
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
Will this work on all win98+ ?


Yes! - This is basic File manipulation stuff. Did you test it?

Shane

Author

Commented:
I'm not able to test it... trust you though :)
OK, well let me know if you have any trouble...

Shane
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.