locked
How can I delete files from C:\Users\User1\AppData\Local\Packages in VS 13?

    Question

  • Hi,

    I want to delete files from C:\Users\User1\AppData\Local\Packages in VS 13 to be able to create the condition of the first time user.

    In VS 12 works not in VS 13 even the folders have the same rights and are in the folder Packeges.

    What service suppose to stop to be able to delete?

     

    Thanks


    ADRIAN DIBU

    Thursday, December 19, 2013 3:55 PM

Answers

  • Hi,

    I did it.

    I delete all subfolders and the main folder.

    Thanks


    ADRIAN DIBU

    • Marked as answer by adibu Monday, December 30, 2013 6:13 PM
    Monday, December 30, 2013 6:13 PM

All replies

  • Hi,

    Do you mean you want to remove the file in the "C:\Users\User1\AppData\Local\Packages" by code or by manually?

    If the first one, you can use FileOpenPicker class to gain access to files, and use StorageFile.DeleteAsync() to delete the file.

    See some codes below:

    FileOpenPicker openPicker = new FileOpenPicker();
                openPicker.ViewMode = PickerViewMode.Thumbnail;
                openPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;
                openPicker.FileTypeFilter.Add(".txt");
                openPicker.FileTypeFilter.Add(".jpeg");
                openPicker.FileTypeFilter.Add(".dat");
    
                StorageFile file = await openPicker.PickSingleFileAsync();
                await file.DeleteAsync();

    Refer to the link:

    http://msdn.microsoft.com/en-us/library/windows/apps/hh771180.aspx

    If the second, in my computer, I can delete the file directly in that path.

    Best Wishes!




    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.



    Friday, December 20, 2013 7:27 AM
  • Hi,

    I want to delete the file of the app from Packages

    to have the same thing the user will have by installing the app and

    roamingSettings.Values don't exist.

    In VS 12 works not in VS 13

    Thanks


    ADRIAN DIBU

    Friday, December 20, 2013 2:38 PM
  • Hi,

    I do not exactly know what you mean. Do you want to remove roamingSetting in your app?

    In windows store app, Local Settings and roaming setting are stored in C:/Users/[username]/AppData/Local/Packages/[app_package]/Settings/settings.dat

    You can refer to the codes to remove roaming setting:

    var roamingSettings = Windows.Storage.ApplicationData.Current.RoamingSettings;
    roamingSettings.Values.Remove("exampleSetting");
    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Monday, December 23, 2013 8:04 AM
  • Hi,

    Thanks for the prompt answer.

    I want to delete not by code the folder  C:\Users\User1\AppData\Local\Packages\AppName.

    I am the administrator and I got the message I suppose to be administrator.

    Thanks


    ADRIAN DIBU

    Tuesday, December 24, 2013 11:02 PM
  • Hi,

    The forum is main about how to develop windows store app. Your thread have little relative with it. I recommend you can go to Windows 8 IT Pro to post your question. You can get more professional answer in there.

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, December 25, 2013 5:46 AM
  • Hi,

    I did it.

    I delete all subfolders and the main folder.

    Thanks


    ADRIAN DIBU

    • Marked as answer by adibu Monday, December 30, 2013 6:13 PM
    Monday, December 30, 2013 6:13 PM