Previously, we always used the directory holding mumble.exe
as the working directory.
This commit changes that to use the versioned root directory
as the working directory -- if we're using one.
When not using a versioned root directory, the old behavior
is kept intact.
This is primarily done to work around mumble-voip/mumble#2837,
where, when loading mumble_app.dll on Windows 7, the search order
for ucrtbase.dll seems to be using the "Standard Search Order for
Desktop Applications" instead of the "Alternate Search Order for
Desktop Applications", as it should when we specify
LOAD_WITH_ALTERED_SEARCH_PATH to LoadLibraryEx.
For context, see the following MSDN page:
Changing the working directory to the versioned root path allows
the Universal CRT to be correctly loaded -- via step 5 of the "Standard
Search Order for Desktop Applications" if SafeDllSearchMode is on --
despite this weird behavior from the system.
Works around mumble-voip/mumble#2837
MS Connect issue: