From 2003345e9e830253e7bcb7fd396710eb80ab1d37 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 8 Nov 2019 11:30:42 +0100 Subject: [run-virt] openslx.exe: Fix share shortcut icon on XP VMs --- core/modules/run-virt/winres/src/winres.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'core/modules') 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( -- cgit v1.2.3-55-g7522