classes.c (c42b133e) classes.c (fd8b07bd)
1/*
2 * Implementation of the Microsoft Installer (msi.dll)
3 *
4 * Copyright 2005 Aric Stewart for CodeWeavers
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either

--- 739 unchanged lines hidden (view full) ---

748{
749 static const WCHAR szFileType_fmt[] = {'F','i','l','e','T','y','p','e','\\','%','s','\\','%','i',0};
750 const WCHAR *keypath;
751 MSIRECORD *uirow;
752 HKEY hkey, hkey2, hkey3;
753 MSICLASS *cls;
754 UINT r;
755
1/*
2 * Implementation of the Microsoft Installer (msi.dll)
3 *
4 * Copyright 2005 Aric Stewart for CodeWeavers
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either

--- 739 unchanged lines hidden (view full) ---

748{
749 static const WCHAR szFileType_fmt[] = {'F','i','l','e','T','y','p','e','\\','%','s','\\','%','i',0};
750 const WCHAR *keypath;
751 MSIRECORD *uirow;
752 HKEY hkey, hkey2, hkey3;
753 MSICLASS *cls;
754 UINT r;
755
756 if (package->script == SCRIPT_NONE)
757 return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterClassInfo);
758
756 r = load_classes_and_such( package );
757 if (r != ERROR_SUCCESS)
758 return r;
759
760 if (is_64bit && package->platform == PLATFORM_INTEL)
761 keypath = szWow6432NodeCLSID;
762 else
763 keypath = szCLSID;

--- 149 unchanged lines hidden (view full) ---

913{
914 static const WCHAR szFileType[] = {'F','i','l','e','T','y','p','e','\\',0};
915 const WCHAR *keypath;
916 MSIRECORD *uirow;
917 MSICLASS *cls;
918 HKEY hkey, hkey2;
919 UINT r;
920
759 r = load_classes_and_such( package );
760 if (r != ERROR_SUCCESS)
761 return r;
762
763 if (is_64bit && package->platform == PLATFORM_INTEL)
764 keypath = szWow6432NodeCLSID;
765 else
766 keypath = szCLSID;

--- 149 unchanged lines hidden (view full) ---

916{
917 static const WCHAR szFileType[] = {'F','i','l','e','T','y','p','e','\\',0};
918 const WCHAR *keypath;
919 MSIRECORD *uirow;
920 MSICLASS *cls;
921 HKEY hkey, hkey2;
922 UINT r;
923
924 if (package->script == SCRIPT_NONE)
925 return msi_schedule_action(package, SCRIPT_INSTALL, szUnregisterClassInfo);
926
921 r = load_classes_and_such( package );
922 if (r != ERROR_SUCCESS)
923 return r;
924
925 if (is_64bit && package->platform == PLATFORM_INTEL)
926 keypath = szWow6432NodeCLSID;
927 else
928 keypath = szCLSID;

--- 149 unchanged lines hidden (view full) ---

1078}
1079
1080UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package)
1081{
1082 MSIPROGID *progid;
1083 MSIRECORD *uirow;
1084 UINT r;
1085
927 r = load_classes_and_such( package );
928 if (r != ERROR_SUCCESS)
929 return r;
930
931 if (is_64bit && package->platform == PLATFORM_INTEL)
932 keypath = szWow6432NodeCLSID;
933 else
934 keypath = szCLSID;

--- 149 unchanged lines hidden (view full) ---

1084}
1085
1086UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package)
1087{
1088 MSIPROGID *progid;
1089 MSIRECORD *uirow;
1090 UINT r;
1091
1092 if (package->script == SCRIPT_NONE)
1093 return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterProgIdInfo);
1094
1086 r = load_classes_and_such( package );
1087 if (r != ERROR_SUCCESS)
1088 return r;
1089
1090 LIST_FOR_EACH_ENTRY( progid, &package->progids, MSIPROGID, entry )
1091 {
1092 if (!has_class_installed( progid ) && !has_one_extension_installed( package, progid ))
1093 {

--- 44 unchanged lines hidden (view full) ---

1138
1139UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package )
1140{
1141 MSIPROGID *progid;
1142 MSIRECORD *uirow;
1143 LONG res;
1144 UINT r;
1145
1095 r = load_classes_and_such( package );
1096 if (r != ERROR_SUCCESS)
1097 return r;
1098
1099 LIST_FOR_EACH_ENTRY( progid, &package->progids, MSIPROGID, entry )
1100 {
1101 if (!has_class_installed( progid ) && !has_one_extension_installed( package, progid ))
1102 {

--- 44 unchanged lines hidden (view full) ---

1147
1148UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package )
1149{
1150 MSIPROGID *progid;
1151 MSIRECORD *uirow;
1152 LONG res;
1153 UINT r;
1154
1155 if (package->script == SCRIPT_NONE)
1156 return msi_schedule_action(package, SCRIPT_INSTALL, szUnregisterProgIdInfo);
1157
1146 r = load_classes_and_such( package );
1147 if (r != ERROR_SUCCESS)
1148 return r;
1149
1150 LIST_FOR_EACH_ENTRY( progid, &package->progids, MSIPROGID, entry )
1151 {
1152 if (!has_class_removed( progid ) ||
1153 (has_extensions( package, progid ) && !has_all_extensions_removed( package, progid )))

--- 96 unchanged lines hidden (view full) ---

1250 static const WCHAR szContentType[] = {'C','o','n','t','e','n','t',' ','T','y','p','e',0};
1251 HKEY hkey = NULL;
1252 MSIEXTENSION *ext;
1253 MSIRECORD *uirow;
1254 BOOL install_on_demand = TRUE;
1255 LONG res;
1256 UINT r;
1257
1158 r = load_classes_and_such( package );
1159 if (r != ERROR_SUCCESS)
1160 return r;
1161
1162 LIST_FOR_EACH_ENTRY( progid, &package->progids, MSIPROGID, entry )
1163 {
1164 if (!has_class_removed( progid ) ||
1165 (has_extensions( package, progid ) && !has_all_extensions_removed( package, progid )))

--- 96 unchanged lines hidden (view full) ---

1262 static const WCHAR szContentType[] = {'C','o','n','t','e','n','t',' ','T','y','p','e',0};
1263 HKEY hkey = NULL;
1264 MSIEXTENSION *ext;
1265 MSIRECORD *uirow;
1266 BOOL install_on_demand = TRUE;
1267 LONG res;
1268 UINT r;
1269
1270 if (package->script == SCRIPT_NONE)
1271 return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterExtensionInfo);
1272
1258 r = load_classes_and_such( package );
1259 if (r != ERROR_SUCCESS)
1260 return r;
1261
1262 /* We need to set install_on_demand based on if the shell handles advertised
1263 * shortcuts and the like. Because Mike McCormack is working on this i am
1264 * going to default to TRUE
1265 */

--- 92 unchanged lines hidden (view full) ---

1358
1359UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package )
1360{
1361 MSIEXTENSION *ext;
1362 MSIRECORD *uirow;
1363 LONG res;
1364 UINT r;
1365
1273 r = load_classes_and_such( package );
1274 if (r != ERROR_SUCCESS)
1275 return r;
1276
1277 /* We need to set install_on_demand based on if the shell handles advertised
1278 * shortcuts and the like. Because Mike McCormack is working on this i am
1279 * going to default to TRUE
1280 */

--- 92 unchanged lines hidden (view full) ---

1373
1374UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package )
1375{
1376 MSIEXTENSION *ext;
1377 MSIRECORD *uirow;
1378 LONG res;
1379 UINT r;
1380
1381 if (package->script == SCRIPT_NONE)
1382 return msi_schedule_action(package, SCRIPT_INSTALL, szUnregisterExtensionInfo);
1383
1366 r = load_classes_and_such( package );
1367 if (r != ERROR_SUCCESS)
1368 return r;
1369
1370 LIST_FOR_EACH_ENTRY( ext, &package->extensions, MSIEXTENSION, entry )
1371 {
1372 LPWSTR extension;
1373 MSIFEATURE *feature;

--- 67 unchanged lines hidden (view full) ---

1441
1442UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package)
1443{
1444 static const WCHAR szExtension[] = {'E','x','t','e','n','s','i','o','n',0};
1445 MSIRECORD *uirow;
1446 MSIMIME *mt;
1447 UINT r;
1448
1384 r = load_classes_and_such( package );
1385 if (r != ERROR_SUCCESS)
1386 return r;
1387
1388 LIST_FOR_EACH_ENTRY( ext, &package->extensions, MSIEXTENSION, entry )
1389 {
1390 LPWSTR extension;
1391 MSIFEATURE *feature;

--- 67 unchanged lines hidden (view full) ---

1459
1460UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package)
1461{
1462 static const WCHAR szExtension[] = {'E','x','t','e','n','s','i','o','n',0};
1463 MSIRECORD *uirow;
1464 MSIMIME *mt;
1465 UINT r;
1466
1467 if (package->script == SCRIPT_NONE)
1468 return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterMIMEInfo);
1469
1449 r = load_classes_and_such( package );
1450 if (r != ERROR_SUCCESS)
1451 return r;
1452
1453 LIST_FOR_EACH_ENTRY( mt, &package->mimes, MSIMIME, entry )
1454 {
1455 LPWSTR extension = NULL, key;
1456

--- 38 unchanged lines hidden (view full) ---

1495}
1496
1497UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package )
1498{
1499 MSIRECORD *uirow;
1500 MSIMIME *mime;
1501 UINT r;
1502
1470 r = load_classes_and_such( package );
1471 if (r != ERROR_SUCCESS)
1472 return r;
1473
1474 LIST_FOR_EACH_ENTRY( mt, &package->mimes, MSIMIME, entry )
1475 {
1476 LPWSTR extension = NULL, key;
1477

--- 38 unchanged lines hidden (view full) ---

1516}
1517
1518UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package )
1519{
1520 MSIRECORD *uirow;
1521 MSIMIME *mime;
1522 UINT r;
1523
1524 if (package->script == SCRIPT_NONE)
1525 return msi_schedule_action(package, SCRIPT_INSTALL, szUnregisterMIMEInfo);
1526
1503 r = load_classes_and_such( package );
1504 if (r != ERROR_SUCCESS)
1505 return r;
1506
1507 LIST_FOR_EACH_ENTRY( mime, &package->mimes, MSIMIME, entry )
1508 {
1509 LONG res;
1510 LPWSTR mime_key;

--- 29 unchanged lines hidden ---
1527 r = load_classes_and_such( package );
1528 if (r != ERROR_SUCCESS)
1529 return r;
1530
1531 LIST_FOR_EACH_ENTRY( mime, &package->mimes, MSIMIME, entry )
1532 {
1533 LONG res;
1534 LPWSTR mime_key;

--- 29 unchanged lines hidden ---