msi: Inform the user with an error message when the MSI file path is invalid.
This commit is contained in:
parent
bf71a2f6c2
commit
fb7646beaa
|
@ -1008,3 +1008,18 @@ WCHAR* generate_error_string(MSIPACKAGE *package, UINT error, DWORD count, ... )
|
||||||
data = NULL;
|
data = NULL;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void msi_ui_error( DWORD msg_id, DWORD type )
|
||||||
|
{
|
||||||
|
WCHAR text[2048];
|
||||||
|
|
||||||
|
static const WCHAR title[] = {
|
||||||
|
'W','i','n','d','o','w','s',' ','I','n','s','t','a','l','l','e','r',0
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!MsiLoadStringW( -1, msg_id, text, sizeof(text) / sizeof(text[0]),
|
||||||
|
MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL) ))
|
||||||
|
return;
|
||||||
|
|
||||||
|
MessageBoxW( NULL, text, title, type );
|
||||||
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
|
4 "The specified installation package could not be opened. Please check the file path and try again."
|
||||||
5 "пътят %s не е намерен"
|
5 "пътят %s не е намерен"
|
||||||
9 "поставете диск %s"
|
9 "поставете диск %s"
|
||||||
10 "некоректни параметри"
|
10 "некоректни параметри"
|
||||||
|
|
|
@ -22,6 +22,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
|
4 "The specified installation package could not be opened. Please check the file path and try again."
|
||||||
5 "Der Pfad %s wurde nicht gefunden."
|
5 "Der Pfad %s wurde nicht gefunden."
|
||||||
9 "Bitte Disk %s einlegen."
|
9 "Bitte Disk %s einlegen."
|
||||||
10 "schlechte Parameter"
|
10 "schlechte Parameter"
|
||||||
|
|
|
@ -22,6 +22,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
|
4 "The specified installation package could not be opened. Please check the file path and try again."
|
||||||
5 "path %s not found"
|
5 "path %s not found"
|
||||||
9 "insert disk %s"
|
9 "insert disk %s"
|
||||||
10 "bad parameters"
|
10 "bad parameters"
|
||||||
|
|
|
@ -22,6 +22,7 @@ LANGUAGE LANG_ESPERANTO, SUBLANG_DEFAULT
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
|
4 "The specified installation package could not be opened. Please check the file path and try again."
|
||||||
5 "Mi ne trovis la vojon %s"
|
5 "Mi ne trovis la vojon %s"
|
||||||
9 "enþovu la diskon %s"
|
9 "enþovu la diskon %s"
|
||||||
10 "nekorektaj parametroj"
|
10 "nekorektaj parametroj"
|
||||||
|
|
|
@ -22,6 +22,7 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
|
4 "The specified installation package could not be opened. Please check the file path and try again."
|
||||||
5 "ruta %s no encontrada"
|
5 "ruta %s no encontrada"
|
||||||
9 "inserte el disco %s"
|
9 "inserte el disco %s"
|
||||||
10 "parámetros incorrectos"
|
10 "parámetros incorrectos"
|
||||||
|
|
|
@ -22,6 +22,7 @@ LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
|
4 "The specified installation package could not be opened. Please check the file path and try again."
|
||||||
5 "Polkua %s ei löydy."
|
5 "Polkua %s ei löydy."
|
||||||
9 "Anna levy %s"
|
9 "Anna levy %s"
|
||||||
10 "Virheelliset parametrit."
|
10 "Virheelliset parametrit."
|
||||||
|
|
|
@ -22,6 +22,7 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
|
4 "The specified installation package could not be opened. Please check the file path and try again."
|
||||||
5 "Le chemin %s est introuvable"
|
5 "Le chemin %s est introuvable"
|
||||||
9 "insérez le disque %s"
|
9 "insérez le disque %s"
|
||||||
10 "mauvais paramètres"
|
10 "mauvais paramètres"
|
||||||
|
|
|
@ -22,6 +22,7 @@ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
|
4 "The specified installation package could not be opened. Please check the file path and try again."
|
||||||
5 "%s útvonal nem található"
|
5 "%s útvonal nem található"
|
||||||
9 "helyezze be a lemezt: %s"
|
9 "helyezze be a lemezt: %s"
|
||||||
10 "rossz paraméterek"
|
10 "rossz paraméterek"
|
||||||
|
|
|
@ -22,6 +22,7 @@ LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
|
4 "The specified installation package could not be opened. Please check the file path and try again."
|
||||||
5 "percorso %s non trovato"
|
5 "percorso %s non trovato"
|
||||||
9 "inserire disco %s"
|
9 "inserire disco %s"
|
||||||
10 "parametri incorretti"
|
10 "parametri incorretti"
|
||||||
|
|
|
@ -22,6 +22,7 @@ LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
|
4 "The specified installation package could not be opened. Please check the file path and try again."
|
||||||
5 "%s 경로를 찾을수 없습니다"
|
5 "%s 경로를 찾을수 없습니다"
|
||||||
9 "디스크 %s 삽입"
|
9 "디스크 %s 삽입"
|
||||||
10 "절못된 매개변수"
|
10 "절못된 매개변수"
|
||||||
|
|
|
@ -22,6 +22,7 @@ LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
|
4 "The specified installation package could not be opened. Please check the file path and try again."
|
||||||
5 "Pad %s niet gevonden"
|
5 "Pad %s niet gevonden"
|
||||||
9 "Plaats disk %s"
|
9 "Plaats disk %s"
|
||||||
10 "Ongeldige parameters"
|
10 "Ongeldige parameters"
|
||||||
|
|
|
@ -22,6 +22,7 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
|
4 "The specified installation package could not be opened. Please check the file path and try again."
|
||||||
5 "Fant ikke stien '%s'."
|
5 "Fant ikke stien '%s'."
|
||||||
9 "Sett i disk '%s'"
|
9 "Sett i disk '%s'"
|
||||||
10 "Gale parametere."
|
10 "Gale parametere."
|
||||||
|
|
|
@ -22,6 +22,7 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_DEFAULT
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
|
4 "The specified installation package could not be opened. Please check the file path and try again."
|
||||||
5 "caminho %s não encontrado"
|
5 "caminho %s não encontrado"
|
||||||
9 "insira disco %s"
|
9 "insira disco %s"
|
||||||
10 "parâmetros inválidos"
|
10 "parâmetros inválidos"
|
||||||
|
|
|
@ -22,6 +22,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
|
4 "The specified installation package could not be opened. Please check the file path and try again."
|
||||||
5 "путь %s не найден"
|
5 "путь %s не найден"
|
||||||
9 "вставьте диск %s"
|
9 "вставьте диск %s"
|
||||||
10 "неверные параметры"
|
10 "неверные параметры"
|
||||||
|
|
|
@ -22,6 +22,7 @@ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
|
4 "The specified installation package could not be opened. Please check the file path and try again."
|
||||||
5 "%s yolu bulunamadı"
|
5 "%s yolu bulunamadı"
|
||||||
9 "%s nolu diski yerleştirin"
|
9 "%s nolu diski yerleştirin"
|
||||||
10 "bozuk parametreler"
|
10 "bozuk parametreler"
|
||||||
|
|
|
@ -47,6 +47,8 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||||
|
|
||||||
|
extern void msi_ui_error( DWORD msg_id, DWORD type );
|
||||||
|
|
||||||
static void MSI_FreePackage( MSIOBJECTHDR *arg)
|
static void MSI_FreePackage( MSIOBJECTHDR *arg)
|
||||||
{
|
{
|
||||||
MSIPACKAGE *package= (MSIPACKAGE*) arg;
|
MSIPACKAGE *package= (MSIPACKAGE*) arg;
|
||||||
|
@ -549,8 +551,13 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
|
||||||
DeleteFileW( file );
|
DeleteFileW( file );
|
||||||
|
|
||||||
if( r != ERROR_SUCCESS )
|
if( r != ERROR_SUCCESS )
|
||||||
|
{
|
||||||
|
if (GetLastError() == ERROR_FILE_NOT_FOUND)
|
||||||
|
msi_ui_error( 4, MB_OK | MB_ICONWARNING );
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
package = MSI_CreatePackage( db );
|
package = MSI_CreatePackage( db );
|
||||||
msiobj_release( &db->hdr );
|
msiobj_release( &db->hdr );
|
||||||
|
|
Loading…
Reference in New Issue