سؤال

I want to extract a zip to %appdata%\subfolder. When I put a route such as C:\Users\User\AppData\Roaming\subfolder, it extracts ok; I want to do this for each %appdata% of the client systems.

I’m using SharpZipLib to extract.

هل كانت مفيدة؟

المحلول

You can get %appdata% in your code using SpecialFolder enum -

string appdata = System.Environment.GetFolderPath(
                       System.Environment.SpecialFolder.ApplicationData)
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top