[vbox-dev] Location of VirtualBox configuration file

Klaus Espenlaub klaus.espenlaub at oracle.com
Thu Nov 10 15:35:16 GMT 2016


I can't answer the question why you always end up with a new file... 
that's making no sense.

What I can tell you is that this part of the the documentation is 
actually outdated and will be fixed soon.

VirtualBox uses %USERPROFILE% or %HOMEDRIVE%%HOMEPATH% only as a 
fallback if the Windows function SHGetFolderPath isn't present (older 
than Windows 2000) or if it unexpectedly returns an error when it gets 
asked for the user profile location.

So the return value of this function is the primary data source. MSDN 
might declare it as deprecated, but using the now recommended 
SHGetKnownFolderPath function won't return anything else and it's only 
available starting with Windows Vista.

The VirtualBox behavior change happened with 4.3.22/5.0.0. Long time 
ago. Guess the docs update was forgotten, because people who know how to 
move user profiles should be also smart enough to do the rest 
consistently, otherwise many apps will get confused.

Klaus

On 09.11.2016 14:23, Malcolm Clarke wrote:
>
>
>
> On 09/11/2016 09:55, malcolm.clarke at brunel.ac.uk wrote:
>>
>> Dear Maxine
>>
>> I did not have a response from developers why the location of the 
>> configuration file is inconsistent, such that it is overwritten every 
>> time.
>>
>> Regards
>>
>> Malcolm
>>
>>
>> On 28/10/2016 16:59, Maxime Dor wrote:
>>> Which VirtualBox version are you using?
>>>
>>> On 28/10/16 16:45, Malcolm Clarke wrote:
>>>>
>>>> Dear Maxine
>>>>
>>>> Regrettably I am not responsible for the configuration of our lab 
>>>> machines, this is done centrally by the University. I am just poor 
>>>> professor made to find workarounds for my labs.
>>>>
>>>> In time we shall use VBOX_USER_HOME, which ought to provide a 
>>>> proper fix as this can point at the home drive of each student (ie 
>>>> H:\).
>>>>
>>>> In the meantime I am only trying to understand why the students are 
>>>> losing their global configuration every time they restart the 
>>>> program, even though the files remain in the directory. Instead the 
>>>> old file is renamed and a new "empty" file is created in its place. 
>>>> This makes no sense if USERPROFILE is used every time.
>>>>
>>>> Regards
>>>>
>>>> Malcolm
>>>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20161110/5ce73f2b/attachment.html>


More information about the vbox-dev mailing list