How can I write my deployment app to force local document folder and not OneDrive?

Wayne McHugh 0 Reputation points
2024-09-26T22:32:05.1533333+00:00

I'm using Visual Studio 2022 using the Microsoft Visual Studio Installer Projects extension for my deployment app. It installs working files into my app folder under documents, but I've learned that sometimes (maybe often), it is going to documents under OneDrive instead of the local computer's documents folder. How can I, from the deployment app end, force it to the local documents folder. Most of my users don't have the computer knowledge to unlink OneDrive, and they shouldn't have to.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,080 questions
Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
214 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 28,666 Reputation points Microsoft Vendor
    2024-09-27T08:03:50.9866667+00:00

    Hi @Wayne McHugh, 

    Welcome to Microsoft Q&A! 

    You can open the File System editor > right-click on the Application Folder node > select Properties Window > set DefaultLocation to [PersonalFolder][Manufacturer][ProductName]

    For PersonalFolder property, it points to the local Documents folder for the current user. 

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".  Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.