diff options
-rw-r--r-- | core/modules/run-virt/winres/src/winres.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/modules/run-virt/winres/src/winres.c b/core/modules/run-virt/winres/src/winres.c index d358e1d5..c5d22bd5 100644 --- a/core/modules/run-virt/winres/src/winres.c +++ b/core/modules/run-virt/winres/src/winres.c @@ -1204,8 +1204,13 @@ static HRESULT createFolderShortcut(wchar_t* targetDir, wchar_t* linkFile, wchar if (comment != NULL) { hRes = pShellLink->lpVtbl->SetDescription(pShellLink, comment); } - StringCchPrintfW(explorer, MAX_PATH, L"%s\\system32\\imageres.dll", windowsPath); - hRes = pShellLink->lpVtbl->SetIconLocation(pShellLink, explorer, 137); + if (winVer.dwMajorVersion >= 6) { // Vista+ + StringCchPrintfW(explorer, MAX_PATH, L"%s\\system32\\imageres.dll", windowsPath); + hRes = pShellLink->lpVtbl->SetIconLocation(pShellLink, explorer, 137); + } else { + StringCchPrintfW(explorer, MAX_PATH, L"%s\\system32\\shell32.dll", windowsPath); + hRes = pShellLink->lpVtbl->SetIconLocation(pShellLink, explorer, 85); + } /* Use the IPersistFile object to save the shell link */ hRes = pShellLink->lpVtbl->QueryInterface( |