I’d like my .NET Compact Framework app to delete itself after it finishes executing. What’s the best way to do this?
On a Windows machine it’s possible to do this using a .bat file, but that’s not an option on mobile devices.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In Windows Mobile there is the directory:
\application data\volatile
This directory is kept for as long as the device has power.
So what we do is:
For compatiblity with all devices you should use the ‘SHGetSpecialFolderPath’ function with CSIDL_APPDATA to get the application data directory and append ‘\volatile’ to it.