Skip to content

update the default save location #56

@willbr

Description

@willbr

I think we should change the default save location to Documents.

Currently, it defaults to creating a user folder under C\Program Files\. However, this isn't allowed in modern windows.

image

Window's creates a VirtualStore to be backwards compatible, but it's hidden from the user.

C:\Users\wjbr\AppData\Local\VirtualStore\Program Files (x86)\Microsoft Kids\USERS\wjbr

Here's where it sets up the folders.

/******************************************************************************
Finds _fniUsersDir, _fniMelanieDir, and _fniUserDir. _fniUserDir is
set from the registry. This function also determines if this is a first
time user.
************************************************************ PETED ***********/
bool APP::_FGetUserDirectories(void)

We can use SHGetFolderPath or SHGetKnownFolderPath to get the path of the Documents folder.

 HRESULT result = SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, myDocuments);

https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetfolderpatha
https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions