https://git.reactos.org/?p=reactos.git;a=commitdiff;h=33a65d45aa81c3296cfd3…
commit 33a65d45aa81c3296cfd31be405345e9a4050435
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sun Jul 8 23:40:14 2018 +0900
Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Jul 8 16:40:14 2018 +0200
[APPWIZ] Add support for creating internet shortcuts (#664)
CORE-8737
---
dll/cpl/appwiz/CMakeLists.txt | 2 +-
dll/cpl/appwiz/appwiz.h | 4 +
dll/cpl/appwiz/createlink.c | 220 ++++++++++++++++++++++++++++--------------
dll/cpl/appwiz/lang/bg-BG.rc | 3 +
dll/cpl/appwiz/lang/cs-CZ.rc | 3 +
dll/cpl/appwiz/lang/de-DE.rc | 3 +
dll/cpl/appwiz/lang/el-GR.rc | 3 +
dll/cpl/appwiz/lang/en-US.rc | 3 +
dll/cpl/appwiz/lang/es-ES.rc | 3 +
dll/cpl/appwiz/lang/et-EE.rc | 3 +
dll/cpl/appwiz/lang/fr-FR.rc | 3 +
dll/cpl/appwiz/lang/he-IL.rc | 3 +
dll/cpl/appwiz/lang/it-IT.rc | 3 +
dll/cpl/appwiz/lang/ja-JP.rc | 3 +
dll/cpl/appwiz/lang/no-NO.rc | 3 +
dll/cpl/appwiz/lang/pl-PL.rc | 3 +
dll/cpl/appwiz/lang/pt-BR.rc | 3 +
dll/cpl/appwiz/lang/ro-RO.rc | 3 +
dll/cpl/appwiz/lang/ru-RU.rc | 3 +
dll/cpl/appwiz/lang/sk-SK.rc | 3 +
dll/cpl/appwiz/lang/sq-AL.rc | 3 +
dll/cpl/appwiz/lang/tr-TR.rc | 3 +
dll/cpl/appwiz/lang/uk-UA.rc | 3 +
dll/cpl/appwiz/lang/zh-CN.rc | 3 +
dll/cpl/appwiz/lang/zh-TW.rc | 3 +
dll/cpl/appwiz/resource.h | 3 +
26 files changed, 221 insertions(+), 74 deletions(-)
diff --git a/dll/cpl/appwiz/CMakeLists.txt b/dll/cpl/appwiz/CMakeLists.txt
index cf926cb656..1a7e4a048c 100644
--- a/dll/cpl/appwiz/CMakeLists.txt
+++ b/dll/cpl/appwiz/CMakeLists.txt
@@ -24,6 +24,6 @@ add_library(appwiz SHARED
set_module_type(appwiz cpl UNICODE)
target_link_libraries(appwiz uuid wine)
add_delay_importlibs(appwiz msi)
-add_importlibs(appwiz urlmon ole32 comctl32 advapi32 shell32 user32 msvcrt kernel32
ntdll)
+add_importlibs(appwiz urlmon ole32 comctl32 advapi32 shell32 shlwapi user32 msvcrt
kernel32 ntdll)
add_pch(appwiz appwiz.h SOURCE)
add_cd_file(TARGET appwiz DESTINATION reactos/system32 FOR all)
diff --git a/dll/cpl/appwiz/appwiz.h b/dll/cpl/appwiz/appwiz.h
index 632345b877..fa38884869 100644
--- a/dll/cpl/appwiz/appwiz.h
+++ b/dll/cpl/appwiz/appwiz.h
@@ -17,6 +17,8 @@
#include <winreg.h>
#include <winnls.h>
#include <shlobj.h>
+#include <intshcut.h>
+#include <shlwapi.h>
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(appwiz);
@@ -28,6 +30,8 @@ typedef struct
WCHAR szTarget[MAX_PATH];
WCHAR szWorkingDirectory[MAX_PATH];
WCHAR szDescription[MAX_PATH];
+ WCHAR szOrigin[MAX_PATH];
+ WCHAR szOldFile[MAX_PATH];
WCHAR szLinkName[MAX_PATH];
} CREATE_LINK_CONTEXT, *PCREATE_LINK_CONTEXT;
diff --git a/dll/cpl/appwiz/createlink.c b/dll/cpl/appwiz/createlink.c
index ba83643f34..4788cc878b 100644
--- a/dll/cpl/appwiz/createlink.c
+++ b/dll/cpl/appwiz/createlink.c
@@ -5,13 +5,13 @@
* PROGRAMMER: Gero Kuehn (reactos.filter(a)gkware.com)
* Dmitry Chapyshev (lentind(a)yandex.ru)
* Johannes Anderwald
+ * Katayama Hirofumi MZ (katayama.hirofumi.mz(a)gmail.com)
* UPDATE HISTORY:
* 06-17-2004 Created
*/
#include "appwiz.h"
-
-#include <tchar.h>
+#include <strsafe.h>
BOOL
IsShortcut(HKEY hKey)
@@ -79,70 +79,102 @@ CreateShortcut(PCREATE_LINK_CONTEXT pContext)
LPWSTR lpExtension;
/* get the extension */
- lpExtension = wcsrchr(pContext->szTarget, '.');
+ lpExtension = PathFindExtensionW(pContext->szTarget);
if (IsExtensionAShortcut(lpExtension))
{
hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_ALL,
&IID_IShellLinkW, (void**)&pSourceShellLink);
- if (hr != S_OK)
+ if (FAILED(hr))
return FALSE;
- hr = pSourceShellLink->lpVtbl->QueryInterface(pSourceShellLink,
&IID_IPersistFile, (void**)&pPersistFile);
- if (hr != S_OK)
+ hr = IUnknown_QueryInterface(pSourceShellLink, &IID_IPersistFile,
(void**)&pPersistFile);
+ if (FAILED(hr))
{
- pSourceShellLink->lpVtbl->Release(pSourceShellLink);
+ IUnknown_Release(pSourceShellLink);
return FALSE;
}
hr = pPersistFile->lpVtbl->Load(pPersistFile,
(LPCOLESTR)pContext->szTarget, STGM_READ);
- pPersistFile->lpVtbl->Release(pPersistFile);
+ IUnknown_Release(pPersistFile);
- if (hr != S_OK)
+ if (FAILED(hr))
{
- pSourceShellLink->lpVtbl->Release(pSourceShellLink);
+ IUnknown_Release(pSourceShellLink);
return FALSE;
}
- hr = pSourceShellLink->lpVtbl->GetPath(pSourceShellLink, Path, sizeof(Path)
/ sizeof(WCHAR), NULL, 0);
- pSourceShellLink->lpVtbl->Release(pSourceShellLink);
+ hr = IShellLinkW_GetPath(pSourceShellLink, Path, _countof(Path), NULL, 0);
+ IUnknown_Release(pSourceShellLink);
- if (hr != S_OK)
+ if (FAILED(hr))
{
return FALSE;
}
}
else
{
- wcscpy(Path, pContext->szTarget);
+ StringCchCopyW(Path, _countof(Path), pContext->szTarget);
}
hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_ALL,
- &IID_IShellLinkW, (void**)&pShellLink);
+ &IID_IShellLinkW, (void**)&pShellLink);
if (hr != S_OK)
return FALSE;
-
pShellLink->lpVtbl->SetPath(pShellLink, Path);
pShellLink->lpVtbl->SetDescription(pShellLink, pContext->szDescription);
pShellLink->lpVtbl->SetWorkingDirectory(pShellLink,
pContext->szWorkingDirectory);
- hr = pShellLink->lpVtbl->QueryInterface(pShellLink, &IID_IPersistFile,
(void**)&pPersistFile);
+ hr = IUnknown_QueryInterface(pShellLink, &IID_IPersistFile,
(void**)&pPersistFile);
if (hr != S_OK)
{
- pShellLink->lpVtbl->Release(pShellLink);
+ IUnknown_Release(pShellLink);
return FALSE;
}
hr = pPersistFile->lpVtbl->Save(pPersistFile, pContext->szLinkName, TRUE);
- pPersistFile->lpVtbl->Release(pPersistFile);
- pShellLink->lpVtbl->Release(pShellLink);
+ IUnknown_Release(pPersistFile);
+ IUnknown_Release(pShellLink);
return (hr == S_OK);
}
+BOOL
+CreateInternetShortcut(PCREATE_LINK_CONTEXT pContext)
+{
+ IUniformResourceLocatorW *pURL = NULL;
+ IPersistFile *pPersistFile = NULL;
+ HRESULT hr;
+ WCHAR szPath[MAX_PATH];
+ GetFullPathNameW(pContext->szLinkName, _countof(szPath), szPath, NULL);
+
+ hr = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_ALL,
+ &IID_IUniformResourceLocatorW, (void **)&pURL);
+ if (FAILED(hr))
+ return FALSE;
+
+ hr = IUnknown_QueryInterface(pURL, &IID_IPersistFile, (void
**)&pPersistFile);
+ if (FAILED(hr))
+ {
+ IUnknown_Release(pURL);
+ return FALSE;
+ }
+
+ pURL->lpVtbl->SetURL(pURL, pContext->szTarget, 0);
+
+ hr = pPersistFile->lpVtbl->Save(pPersistFile, szPath, TRUE);
+
+ IUnknown_Release(pPersistFile);
+ IUnknown_Release(pURL);
+ return SUCCEEDED(hr);
+}
+BOOL IsInternetLocation(LPCWSTR pszLocation)
+{
+ return (PathIsURLW(pszLocation) || wcsstr(pszLocation, L"www.") ==
pszLocation);
+}
INT_PTR
CALLBACK
@@ -158,7 +190,6 @@ WelcomeDlgProc(HWND hwndDlg,
WCHAR szDesc[100];
BROWSEINFOW brws;
LPITEMIDLIST pidllist;
- IMalloc* malloc;
switch(uMsg)
{
@@ -196,15 +227,10 @@ WelcomeDlgProc(HWND hwndDlg,
break;
if (SHGetPathFromIDListW(pidllist, szPath))
- SendDlgItemMessage(hwndDlg, IDC_SHORTCUT_LOCATION, WM_SETTEXT, 0,
(LPARAM)szPath);
+ SetDlgItemTextW(hwndDlg, IDC_SHORTCUT_LOCATION, szPath);
/* Free memory, if possible */
- if (SUCCEEDED(SHGetMalloc(&malloc)))
- {
- IMalloc_Free(malloc, pidllist);
- IMalloc_Release(malloc);
- }
-
+ CoTaskMemFree(pidllist);
break;
}
break;
@@ -212,47 +238,45 @@ WelcomeDlgProc(HWND hwndDlg,
lppsn = (LPPSHNOTIFY) lParam;
if (lppsn->hdr.code == PSN_WIZNEXT)
{
+ LPWSTR pch;
pContext = (PCREATE_LINK_CONTEXT) GetWindowLongPtr(hwndDlg, DWLP_USER);
- SendDlgItemMessageW(hwndDlg, IDC_SHORTCUT_LOCATION, WM_GETTEXT, MAX_PATH,
(LPARAM)pContext->szTarget);
- ///
- /// FIXME
- /// it should also be possible to create a link to folders, shellobjects
etc....
- ///
- if (GetFileAttributesW(pContext->szTarget) ==
INVALID_FILE_ATTRIBUTES)
+ GetDlgItemTextW(hwndDlg, IDC_SHORTCUT_LOCATION, pContext->szTarget,
_countof(pContext->szTarget));
+ StrTrimW(pContext->szTarget, L" \t");
+
+ if (IsInternetLocation(pContext->szTarget))
{
- szDesc[0] = L'\0';
- szPath[0] = L'\0';
- if (LoadStringW(hApplet, IDS_CREATE_SHORTCUT, szDesc, 100) < 100
&&
- LoadStringW(hApplet, IDS_ERROR_NOT_FOUND, szPath, MAX_PATH) <
MAX_PATH)
- {
- WCHAR szError[MAX_PATH + 100];
- swprintf(szError, szPath, pContext->szTarget);
- MessageBoxW(hwndDlg, szError, szDesc, MB_ICONERROR);
- }
+ /* internet */
+ WCHAR szName[128];
+ LoadStringW(hApplet, IDS_NEW_INTERNET_SHORTCUT, szName,
_countof(szName));
+ StringCchCopyW(pContext->szDescription,
_countof(pContext->szDescription), szName);
+
+ pContext->szWorkingDirectory[0] = 0;
+ }
+ else if (GetFileAttributesW(pContext->szTarget) !=
INVALID_FILE_ATTRIBUTES)
+ {
+ /* file */
SendDlgItemMessage(hwndDlg, IDC_SHORTCUT_LOCATION, EM_SETSEL, 0,
-1);
SetFocus(GetDlgItem(hwndDlg, IDC_SHORTCUT_LOCATION));
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT,
PSNRET_INVALID_NOCHANGEPAGE);
- return -1;
+
+ /* set working directory */
+ StringCchCopyW(pContext->szWorkingDirectory,
_countof(pContext->szWorkingDirectory),
+ pContext->szTarget);
+ PathRemoveBackslashW(pContext->szWorkingDirectory);
+ pch = PathFindFileNameW(pContext->szWorkingDirectory);
+ if (pch && *pch)
+ *pch = 0;
+ PathRemoveBackslashW(pContext->szWorkingDirectory);
}
else
{
- WCHAR * first, *last;
- wcscpy(pContext->szWorkingDirectory, pContext->szTarget);
- first = wcschr(pContext->szWorkingDirectory, L'\\');
- last = wcsrchr(pContext->szWorkingDirectory, L'\\');
- wcscpy(pContext->szDescription, &last[1]);
-
- if (first != last)
- last[0] = L'\0';
- else
- first[1] = L'\0';
-
- first = wcsrchr(pContext->szDescription, L'.');
-
- if(first)
- first[0] = L'\0';
+ /* not found */
+ WCHAR szError[MAX_PATH + 100];
+ LoadStringW(hApplet, IDS_CREATE_SHORTCUT, szDesc, _countof(szDesc));
+ LoadStringW(hApplet, IDS_ERROR_NOT_FOUND, szPath, _countof(szPath));
+ StringCchPrintfW(szError, _countof(szError), szPath,
pContext->szTarget);
+ MessageBoxW(hwndDlg, szError, szDesc, MB_ICONERROR);
}
-
}
break;
}
@@ -276,7 +300,7 @@ FinishDlgProc(HWND hwndDlg,
ppsp = (LPPROPSHEETPAGEW)lParam;
pContext = (PCREATE_LINK_CONTEXT) ppsp->lParam;
SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pContext);
- SendDlgItemMessageW(hwndDlg, IDC_SHORTCUT_NAME, WM_SETTEXT, 0,
(LPARAM)pContext->szDescription);
+ SetDlgItemTextW(hwndDlg, IDC_SHORTCUT_NAME, pContext->szDescription);
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_FINISH);
break;
case WM_COMMAND:
@@ -299,16 +323,60 @@ FinishDlgProc(HWND hwndDlg,
pContext = (PCREATE_LINK_CONTEXT) GetWindowLongPtr(hwndDlg, DWLP_USER);
if (lppsn->hdr.code == PSN_WIZFINISH)
{
- SendDlgItemMessageW(hwndDlg, IDC_SHORTCUT_NAME, WM_GETTEXT, MAX_PATH,
(LPARAM)pContext->szDescription);
- wcscat(pContext->szLinkName, pContext->szDescription);
- wcscat(pContext->szLinkName, L".lnk");
- if (!CreateShortcut(pContext))
+ LPWSTR pch;
+ DWORD attrs;
+ GetDlgItemTextW(hwndDlg, IDC_SHORTCUT_NAME, pContext->szDescription,
MAX_PATH);
+ StrTrimW(pContext->szDescription, L" \t");
+
+ /* if old shortcut file exists, then delete it now */
+ attrs = GetFileAttributesW(pContext->szOldFile);
+ if (attrs != INVALID_FILE_ATTRIBUTES && !(attrs &
FILE_ATTRIBUTE_DIRECTORY))
{
- MessageBox(hwndDlg, _T("Failed to create shortcut"),
_T("Error"), MB_ICONERROR);
+ DeleteFileW(pContext->szOldFile);
}
- }
-
+ if (IsInternetLocation(pContext->szTarget))
+ {
+ /* internet */
+ StringCchCopyW(pContext->szLinkName,
_countof(pContext->szLinkName),
+ pContext->szOrigin);
+ PathAppendW(pContext->szLinkName, pContext->szDescription);
+
+ /* change extension if any */
+ pch = PathFindExtensionW(pContext->szLinkName);
+ if (pch && *pch)
+ *pch = 0;
+ StringCchCatW(pContext->szLinkName,
_countof(pContext->szLinkName), L".url");
+
+ if (!CreateInternetShortcut(pContext))
+ {
+ WCHAR szMessage[128];
+ LoadStringW(hApplet, IDS_CANTMAKEINETSHORTCUT, szMessage,
_countof(szMessage));
+ MessageBoxW(hwndDlg, szMessage, NULL, MB_ICONERROR);
+ }
+ }
+ else
+ {
+ /* file */
+ StringCchCopyW(pContext->szLinkName,
_countof(pContext->szLinkName),
+ pContext->szOrigin);
+ PathAppendW(pContext->szLinkName, pContext->szDescription);
+
+ /* change extension if any */
+ pch = PathFindExtensionW(pContext->szLinkName);
+ if (pch && *pch)
+ *pch = 0;
+ StringCchCatW(pContext->szLinkName,
_countof(pContext->szLinkName), L".lnk");
+
+ if (!CreateShortcut(pContext))
+ {
+ WCHAR szMessage[128];
+ LoadStringW(hApplet, IDS_CANTMAKESHORTCUT, szMessage,
_countof(szMessage));
+ MessageBoxW(hwndDlg, szMessage, NULL, MB_ICONERROR);
+ }
+ }
+ }
+ break;
}
return FALSE;
}
@@ -329,6 +397,7 @@ ShowCreateShortcutWizard(HWND hwndCPl, LPWSTR szPath)
/* no memory */
return FALSE;
}
+
nLength = wcslen(szPath);
if (!nLength)
{
@@ -347,13 +416,18 @@ ShowCreateShortcutWizard(HWND hwndCPl, LPWSTR szPath)
return FALSE;
}
- wcscpy(pContext->szLinkName, szPath);
- if (pContext->szLinkName[nLength-1] != L'\\')
+ /* build the pContext->szOrigin and pContext->szOldFile */
+ StringCchCopyW(pContext->szOrigin, _countof(pContext->szOrigin), szPath);
+ pContext->szOldFile[0] = 0;
+ if (!(attrs & FILE_ATTRIBUTE_DIRECTORY))
{
- pContext->szLinkName[nLength] = L'\\';
- pContext->szLinkName[nLength+1] = L'\0';
+ LPWSTR pch;
+ StringCchCopyW(pContext->szOldFile, _countof(pContext->szOldFile),
szPath);
+ pch = PathFindFileNameW(pContext->szOrigin);
+ if (pch && *pch)
+ *pch = 0;
}
-
+ PathAddBackslashW(pContext->szOrigin);
/* Create the Welcome page */
psp.dwSize = sizeof(PROPSHEETPAGE);
diff --git a/dll/cpl/appwiz/lang/bg-BG.rc b/dll/cpl/appwiz/lang/bg-BG.rc
index aea61b4278..f1a883b21b 100644
--- a/dll/cpl/appwiz/lang/bg-BG.rc
+++ b/dll/cpl/appwiz/lang/bg-BG.rc
@@ -78,4 +78,7 @@ BEGIN
IDS_DOWNLOADING "Downloading..."
IDS_INSTALLING "Installing..."
IDS_INVALID_SHA "Unexpected checksum of downloaded file. Aborting installation
of corrupted file."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/cs-CZ.rc b/dll/cpl/appwiz/lang/cs-CZ.rc
index 8238fc3e24..3b60b303ca 100644
--- a/dll/cpl/appwiz/lang/cs-CZ.rc
+++ b/dll/cpl/appwiz/lang/cs-CZ.rc
@@ -83,4 +83,7 @@ BEGIN
IDS_DOWNLOADING "Stahování..."
IDS_INSTALLING "Instalace..."
IDS_INVALID_SHA "Stažený soubor má neplatný kontrolní součet. Instalace
poškozeného souboru bude přerušena."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/de-DE.rc b/dll/cpl/appwiz/lang/de-DE.rc
index 26cc670b44..7dca52c8fa 100644
--- a/dll/cpl/appwiz/lang/de-DE.rc
+++ b/dll/cpl/appwiz/lang/de-DE.rc
@@ -78,4 +78,7 @@ BEGIN
IDS_DOWNLOADING "Lade herunter..."
IDS_INSTALLING "Installiere..."
IDS_INVALID_SHA "Die heruntergeladene Datei hat eine unerwartete Prüfsumme.
Abbruch der Installation aufgrund beschädigter Datei."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/el-GR.rc b/dll/cpl/appwiz/lang/el-GR.rc
index bb799dc52e..d747592d19 100644
--- a/dll/cpl/appwiz/lang/el-GR.rc
+++ b/dll/cpl/appwiz/lang/el-GR.rc
@@ -78,4 +78,7 @@ BEGIN
IDS_DOWNLOADING "Downloading..."
IDS_INSTALLING "Installing..."
IDS_INVALID_SHA "Unexpected checksum of downloaded file. Aborting installation
of corrupted file."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/en-US.rc b/dll/cpl/appwiz/lang/en-US.rc
index 1896cd9074..e5d9516b17 100644
--- a/dll/cpl/appwiz/lang/en-US.rc
+++ b/dll/cpl/appwiz/lang/en-US.rc
@@ -78,4 +78,7 @@ BEGIN
IDS_DOWNLOADING "Downloading..."
IDS_INSTALLING "Installing..."
IDS_INVALID_SHA "Unexpected checksum of downloaded file. Aborting installation
of corrupted file."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/es-ES.rc b/dll/cpl/appwiz/lang/es-ES.rc
index ab63639a6d..949de044c3 100644
--- a/dll/cpl/appwiz/lang/es-ES.rc
+++ b/dll/cpl/appwiz/lang/es-ES.rc
@@ -84,4 +84,7 @@ BEGIN
IDS_DOWNLOADING "Descargando..."
IDS_INSTALLING "Instalando..."
IDS_INVALID_SHA "La suma de verificación del archivo descargado no coincide. Se
ha cancelado la instalación del archivo corrupto."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/et-EE.rc b/dll/cpl/appwiz/lang/et-EE.rc
index 926b579473..6d41c1bbd1 100644
--- a/dll/cpl/appwiz/lang/et-EE.rc
+++ b/dll/cpl/appwiz/lang/et-EE.rc
@@ -85,4 +85,7 @@ BEGIN
IDS_DOWNLOADING "Allalaadimine..."
IDS_INSTALLING "Paigaldamine..."
IDS_INVALID_SHA "Kontrollsumma ei kattu. Paigaldamine katkestatud korrupteerinud
faili tõttu."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/fr-FR.rc b/dll/cpl/appwiz/lang/fr-FR.rc
index cb23ebef3a..6c942eeeb3 100644
--- a/dll/cpl/appwiz/lang/fr-FR.rc
+++ b/dll/cpl/appwiz/lang/fr-FR.rc
@@ -78,4 +78,7 @@ BEGIN
IDS_DOWNLOADING "Téléchargement..."
IDS_INSTALLING "Installation..."
IDS_INVALID_SHA "La somme de contrôle du fichier téléchargé est erronée. Abandon
de l'installation du fichier corrompu."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/he-IL.rc b/dll/cpl/appwiz/lang/he-IL.rc
index 948ede82ec..145a093bd5 100644
--- a/dll/cpl/appwiz/lang/he-IL.rc
+++ b/dll/cpl/appwiz/lang/he-IL.rc
@@ -79,4 +79,7 @@ BEGIN
IDS_DOWNLOADING "Downloading..."
IDS_INSTALLING "Installing..."
IDS_INVALID_SHA "Unexpected checksum of downloaded file. Aborting installation
of corrupted file."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/it-IT.rc b/dll/cpl/appwiz/lang/it-IT.rc
index 4cb79f9bf8..f7b388cebf 100644
--- a/dll/cpl/appwiz/lang/it-IT.rc
+++ b/dll/cpl/appwiz/lang/it-IT.rc
@@ -78,4 +78,7 @@ BEGIN
IDS_DOWNLOADING "Scaricando..."
IDS_INSTALLING "Installando..."
IDS_INVALID_SHA "Checksum imprevisto del file scaricato. Interruzione
installazione del file danneggiato."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/ja-JP.rc b/dll/cpl/appwiz/lang/ja-JP.rc
index f63d532fb0..c70ab86ff4 100644
--- a/dll/cpl/appwiz/lang/ja-JP.rc
+++ b/dll/cpl/appwiz/lang/ja-JP.rc
@@ -78,4 +78,7 @@ BEGIN
IDS_DOWNLOADING "ダウンロード中..."
IDS_INSTALLING "インストール中..."
IDS_INVALID_SHA "ダウンロードしたファイルのチェックサムが合致しません。壊れたファイルのインストールを中止しています。"
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/no-NO.rc b/dll/cpl/appwiz/lang/no-NO.rc
index 2cb892a1c7..26295693e1 100644
--- a/dll/cpl/appwiz/lang/no-NO.rc
+++ b/dll/cpl/appwiz/lang/no-NO.rc
@@ -78,4 +78,7 @@ BEGIN
IDS_DOWNLOADING "Downloading..."
IDS_INSTALLING "Installing..."
IDS_INVALID_SHA "Unexpected checksum of downloaded file. Aborting installation
of corrupted file."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/pl-PL.rc b/dll/cpl/appwiz/lang/pl-PL.rc
index 4f2cba6b4c..faf2be54fb 100644
--- a/dll/cpl/appwiz/lang/pl-PL.rc
+++ b/dll/cpl/appwiz/lang/pl-PL.rc
@@ -87,4 +87,7 @@ BEGIN
IDS_DOWNLOADING "Ściąganie..."
IDS_INSTALLING "Instalowanie..."
IDS_INVALID_SHA "Nieoczekiwana suma kontrolna ściągniętego pliku. Przerwanie
instalacji uszkodzonego pliku."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/pt-BR.rc b/dll/cpl/appwiz/lang/pt-BR.rc
index 26309f7e92..cbfebd02c4 100644
--- a/dll/cpl/appwiz/lang/pt-BR.rc
+++ b/dll/cpl/appwiz/lang/pt-BR.rc
@@ -80,4 +80,7 @@ BEGIN
IDS_DOWNLOADING "Downloading..."
IDS_INSTALLING "Installing..."
IDS_INVALID_SHA "Unexpected checksum of downloaded file. Aborting installation
of corrupted file."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/ro-RO.rc b/dll/cpl/appwiz/lang/ro-RO.rc
index 0df84c5609..20464bafef 100644
--- a/dll/cpl/appwiz/lang/ro-RO.rc
+++ b/dll/cpl/appwiz/lang/ro-RO.rc
@@ -84,4 +84,7 @@ BEGIN
IDS_DOWNLOADING "În curs de descărcare…"
IDS_INSTALLING "În curs de instalare…"
IDS_INVALID_SHA "Suma de control a fișierului descărcat nu corespunde. Deoarece
fișierul a fost corupt, instalarea trebuie abandonată."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/ru-RU.rc b/dll/cpl/appwiz/lang/ru-RU.rc
index 00dc080900..aae79bc685 100644
--- a/dll/cpl/appwiz/lang/ru-RU.rc
+++ b/dll/cpl/appwiz/lang/ru-RU.rc
@@ -78,4 +78,7 @@ BEGIN
IDS_DOWNLOADING "Загрузка..."
IDS_INSTALLING "Установка..."
IDS_INVALID_SHA "Ошибка контрольной суммы загруженного файла. Прерывание
установки поврежденного файла."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/sk-SK.rc b/dll/cpl/appwiz/lang/sk-SK.rc
index c20ab5fe6d..5fb25dd6d9 100644
--- a/dll/cpl/appwiz/lang/sk-SK.rc
+++ b/dll/cpl/appwiz/lang/sk-SK.rc
@@ -82,4 +82,7 @@ BEGIN
IDS_DOWNLOADING "Downloading..."
IDS_INSTALLING "Installing..."
IDS_INVALID_SHA "Unexpected checksum of downloaded file. Aborting installation
of corrupted file."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/sq-AL.rc b/dll/cpl/appwiz/lang/sq-AL.rc
index 6517d0b018..4bdac0270e 100644
--- a/dll/cpl/appwiz/lang/sq-AL.rc
+++ b/dll/cpl/appwiz/lang/sq-AL.rc
@@ -82,4 +82,7 @@ BEGIN
IDS_DOWNLOADING "Shkarkim..."
IDS_INSTALLING "Instalim..."
IDS_INVALID_SHA "Kontroll i papritur ne shkarkimin e skedarit. Duke lënë
instalimin e dokumentave të korruptuar."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/tr-TR.rc b/dll/cpl/appwiz/lang/tr-TR.rc
index 35c170a6c6..8c9f6573b9 100644
--- a/dll/cpl/appwiz/lang/tr-TR.rc
+++ b/dll/cpl/appwiz/lang/tr-TR.rc
@@ -80,4 +80,7 @@ BEGIN
IDS_DOWNLOADING "İndiriliyor..."
IDS_INSTALLING "Kuruluyor..."
IDS_INVALID_SHA "İndirilen kütüğün sağlama toplamı beklenmeyen. Bozuk kütüğün
kurulumu iptal ediliyor."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/uk-UA.rc b/dll/cpl/appwiz/lang/uk-UA.rc
index 4c276fd698..94d1d23ef4 100644
--- a/dll/cpl/appwiz/lang/uk-UA.rc
+++ b/dll/cpl/appwiz/lang/uk-UA.rc
@@ -86,4 +86,7 @@ BEGIN
IDS_DOWNLOADING "Downloading..."
IDS_INSTALLING "Installing..."
IDS_INVALID_SHA "Unexpected checksum of downloaded file. Aborting installation
of corrupted file."
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/zh-CN.rc b/dll/cpl/appwiz/lang/zh-CN.rc
index 9a07ba1ecb..4be6c8bcef 100644
--- a/dll/cpl/appwiz/lang/zh-CN.rc
+++ b/dll/cpl/appwiz/lang/zh-CN.rc
@@ -87,4 +87,7 @@ BEGIN
IDS_DOWNLOADING "正在下载..."
IDS_INSTALLING "正在安装..."
IDS_INVALID_SHA "下载的文件校验和错误。中止安装已损坏的文件。"
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/lang/zh-TW.rc b/dll/cpl/appwiz/lang/zh-TW.rc
index 083365a0e2..b123d0f91e 100644
--- a/dll/cpl/appwiz/lang/zh-TW.rc
+++ b/dll/cpl/appwiz/lang/zh-TW.rc
@@ -85,4 +85,7 @@ BEGIN
IDS_DOWNLOADING "下載中..."
IDS_INSTALLING "安裝中..."
IDS_INVALID_SHA "意外的下載了的檔案的校驗和。中止安裝已損壞的檔案。"
+ IDS_NEW_INTERNET_SHORTCUT "New Internet Shortcut"
+ IDS_CANTMAKEINETSHORTCUT "Failed to create internet shortcut."
+ IDS_CANTMAKESHORTCUT "Failed to create shortcut."
END
diff --git a/dll/cpl/appwiz/resource.h b/dll/cpl/appwiz/resource.h
index 2f721adda8..3df2999642 100644
--- a/dll/cpl/appwiz/resource.h
+++ b/dll/cpl/appwiz/resource.h
@@ -22,6 +22,9 @@
#define IDS_CPLSYSTEMDESCRIPTION 2001
#define IDS_CREATE_SHORTCUT 2021
#define IDS_ERROR_NOT_FOUND 2022
+#define IDS_NEW_INTERNET_SHORTCUT 2023
+#define IDS_CANTMAKEINETSHORTCUT 2024
+#define IDS_CANTMAKESHORTCUT 2025
#define IDS_DOWNLOADING 14
#define IDS_INSTALLING 15