VirtualBox

Changeset 28544 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Apr 21, 2010 8:10:03 AM (15 years ago)
Author:
vboxsync
Message:

VbglR3: Added Windows storage path lookup for built in vendors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibAdditions.cpp

    r27083 r28544  
    8787    LONG r;
    8888
    89     /* Check the new path first. */
    90     r = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Sun\\VirtualBox Guest Additions", 0, KEY_READ, phKey);
     89    /* Check the built in vendor path first. */
     90    char szPath[255];
     91    RTStrPrintf(szPath, sizeof(szPath), "SOFTWARE\\%s\\VirtualBox Guest Additions", VBOX_VENDOR_SHORT);
     92    r = RegOpenKeyEx(HKEY_LOCAL_MACHINE, szPath, 0, KEY_READ, phKey);
    9193# ifdef RT_ARCH_AMD64
    9294    if (r != ERROR_SUCCESS)
    9395    {
    94         /* Check Wow6432Node (for new entries). */
    95         r = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wow6432Node\\Sun\\VirtualBox Guest Additions", 0, KEY_READ, phKey);
     96        /* Check Wow6432Node. */
     97        RTStrPrintf(szPath, sizeof(szPath), "SOFTWARE\\Wow6432Node\\%s\\VirtualBox Guest Additions", VBOX_VENDOR_SHORT);
     98        r = RegOpenKeyEx(HKEY_LOCAL_MACHINE, szPath, 0, KEY_READ, phKey);
    9699    }
    97100# endif
    98101
    99     /* Still no luck? Then try the old xVM paths ... */
     102    /* Check the "Sun" path first. */
     103    if (r != ERROR_SUCCESS)
     104    {
     105        r = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Sun\\VirtualBox Guest Additions", 0, KEY_READ, phKey);
     106# ifdef RT_ARCH_AMD64
     107        if (r != ERROR_SUCCESS)
     108        {
     109            /* Check Wow6432Node (for new entries). */
     110            r = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wow6432Node\\Sun\\VirtualBox Guest Additions", 0, KEY_READ, phKey);
     111        }
     112# endif
     113    }
     114
     115    /* Still no luck? Then try the old "Sun xVM" paths ... */
    100116    if (r != ERROR_SUCCESS)
    101117    {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette