summaryrefslogtreecommitdiffstats
path: root/core/modules
diff options
context:
space:
mode:
authorSimon Rettberg2019-11-08 11:30:42 +0100
committerSimon Rettberg2019-11-08 11:30:42 +0100
commit2003345e9e830253e7bcb7fd396710eb80ab1d37 (patch)
tree115285a27e45a635995650d09fd513ca4b3edd9b /core/modules
parent[run-virt] openslx.exe: Log UNC path on mount failure (diff)
downloadmltk-2003345e9e830253e7bcb7fd396710eb80ab1d37.tar.gz
mltk-2003345e9e830253e7bcb7fd396710eb80ab1d37.tar.xz
mltk-2003345e9e830253e7bcb7fd396710eb80ab1d37.zip
[run-virt] openslx.exe: Fix share shortcut icon on XP VMs
Diffstat (limited to 'core/modules')
-rw-r--r--core/modules/run-virt/winres/src/winres.c9
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(