none
Environment SpecialFolder returns "OneDrive" in path but OneDrive is not enabled on deployed system. RRS feed

  • Question

  •  am using Environment.GetFolderPath(Environment.SpecialFolder.Personal); to open a file in "users\username\saved games" (for example) but when deployed I see OneDrive substituted after username and I do not know how to stop that on systems that have OneDrive hidden.

    I read where one can set FileDialog.AutoUpgradeEnabled=False to stop dialog box widget from using OneDrive but I dont see the equivalent here.

    I used grpedit to stop OneDrive service on my surface pro as I didnt want it. I did not uninstall or delete OneDrive. The development system (VS 15) also has OneDrive turned off and I can run the program just fine there. It is the deployed program on my surface pro that keeps trying to open my data files through OneDrive.

    Unless there is a way to code this correctly I will probably look for "OneDrive" in the string returned by environment and if the open fails then remove that phrase and try again.

    Monday, August 14, 2017 5:23 PM

All replies

  • Hi BeemerBiker,

    Thank you for posting here.

    According to your question is more related to OneDrive, you could post a new thread in SO.

    https://stackoverflow.com/questions/tagged/onedrive

    This forum discuss and ask the C# programming language, IDE, libraries, samples and tools. 

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, August 15, 2017 6:56 AM