diff options
| author | Simon Rettberg | 2019-11-08 11:30:42 +0100 |
|---|---|---|
| committer | Simon Rettberg | 2019-11-08 11:30:42 +0100 |
| commit | 2003345e9e830253e7bcb7fd396710eb80ab1d37 (patch) | |
| tree | 115285a27e45a635995650d09fd513ca4b3edd9b | |
| parent | [run-virt] openslx.exe: Log UNC path on mount failure (diff) | |
| download | mltk-2003345e9e830253e7bcb7fd396710eb80ab1d37.tar.gz mltk-2003345e9e830253e7bcb7fd396710eb80ab1d37.tar.xz mltk-2003345e9e830253e7bcb7fd396710eb80ab1d37.zip | |
[run-virt] openslx.exe: Fix share shortcut icon on XP VMs
| -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( |
