https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2ae526a0395c263b53cb5…
commit 2ae526a0395c263b53cb5cfcb171dbcfac5dd541
Author: George Bișoc <george.bisoc(a)reactos.org>
AuthorDate: Sun Mar 7 14:24:16 2021 +0100
Commit: George Bișoc <george.bisoc(a)reactos.org>
CommitDate: Sat Apr 10 17:38:23 2021 +0200
[SHELL32] Do not format the partition if it's a system drive
Implement a sanity check helper which determines if the partition is a system drive or
not based on the %SystemDrive% environment variable, preventing the user from nuking
accidentally the partition with ReactOS system files installed. :P
NOTE: This code serves as a temporary measure to prevent accidental formatting of the
system drive. In the future most of this code has to be totally rewritten (and stopping
syncing with WINE altogether) as well as FMIFS library code so that we're on par in
terms of compatibility with Windows.
---
dll/win32/shell32/dialogs/drive.cpp | 40 ++++++++++++++++++++++++++++++++++++-
dll/win32/shell32/lang/bg-BG.rc | 4 ++++
dll/win32/shell32/lang/ca-ES.rc | 4 ++++
dll/win32/shell32/lang/cs-CZ.rc | 4 ++++
dll/win32/shell32/lang/da-DK.rc | 4 ++++
dll/win32/shell32/lang/de-DE.rc | 4 ++++
dll/win32/shell32/lang/el-GR.rc | 4 ++++
dll/win32/shell32/lang/en-GB.rc | 4 ++++
dll/win32/shell32/lang/en-US.rc | 4 ++++
dll/win32/shell32/lang/es-ES.rc | 4 ++++
dll/win32/shell32/lang/et-EE.rc | 4 ++++
dll/win32/shell32/lang/fi-FI.rc | 4 ++++
dll/win32/shell32/lang/fr-FR.rc | 4 ++++
dll/win32/shell32/lang/he-IL.rc | 4 ++++
dll/win32/shell32/lang/hi-IN.rc | 4 ++++
dll/win32/shell32/lang/hu-HU.rc | 4 ++++
dll/win32/shell32/lang/id-ID.rc | 4 ++++
dll/win32/shell32/lang/it-IT.rc | 4 ++++
dll/win32/shell32/lang/ja-JP.rc | 4 ++++
dll/win32/shell32/lang/ko-KR.rc | 4 ++++
dll/win32/shell32/lang/nl-NL.rc | 4 ++++
dll/win32/shell32/lang/no-NO.rc | 4 ++++
dll/win32/shell32/lang/pl-PL.rc | 4 ++++
dll/win32/shell32/lang/pt-BR.rc | 4 ++++
dll/win32/shell32/lang/pt-PT.rc | 4 ++++
dll/win32/shell32/lang/ro-RO.rc | 4 ++++
dll/win32/shell32/lang/ru-RU.rc | 4 ++++
dll/win32/shell32/lang/sk-SK.rc | 4 ++++
dll/win32/shell32/lang/sl-SI.rc | 4 ++++
dll/win32/shell32/lang/sq-AL.rc | 4 ++++
dll/win32/shell32/lang/sv-SE.rc | 4 ++++
dll/win32/shell32/lang/tr-TR.rc | 4 ++++
dll/win32/shell32/lang/uk-UA.rc | 4 ++++
dll/win32/shell32/lang/zh-CN.rc | 4 ++++
dll/win32/shell32/lang/zh-TW.rc | 4 ++++
dll/win32/shell32/shresdef.h | 4 ++++
36 files changed, 179 insertions(+), 1 deletion(-)
diff --git a/dll/win32/shell32/dialogs/drive.cpp b/dll/win32/shell32/dialogs/drive.cpp
index 0b22f83af02..0cb1051e49a 100644
--- a/dll/win32/shell32/dialogs/drive.cpp
+++ b/dll/win32/shell32/dialogs/drive.cpp
@@ -35,6 +35,35 @@ typedef struct
EXTERN_C HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT
max_iface, IDataObject *pDataObj);
HPROPSHEETPAGE SH_CreatePropertySheetPage(LPCSTR resname, DLGPROC dlgproc, LPARAM lParam,
LPWSTR szTitle);
+/*
+ * TODO: In Windows the Shell doesn't know by itself if a drive is
+ * a system one or not but rather a packet message is being sent by
+ * FMIFS library code and further translated into specific packet
+ * status codes in the Shell, the packet being _FMIFS_PACKET_TYPE.
+ *
+ * With that being said, most of this code as well as FMIFS library code
+ * have to be refactored in order to comply with the way Windows works.
+ *
+ * See the enum definition for more details:
+ *
https://github.com/microsoft/winfile/blob/master/src/fmifs.h#L23
+ */
+static BOOL
+IsSystemDrive(PFORMAT_DRIVE_CONTEXT pContext)
+{
+ WCHAR wszDriveLetter[6], wszSystemDrv[6];
+
+ wszDriveLetter[0] = pContext->Drive + L'A';
+ StringCchCatW(wszDriveLetter, _countof(wszDriveLetter), L":");
+
+ if (!GetEnvironmentVariableW(L"SystemDrive", wszSystemDrv,
_countof(wszSystemDrv)))
+ return FALSE;
+
+ if (!wcsicmp(wszDriveLetter, wszSystemDrv))
+ return TRUE;
+
+ return FALSE;
+}
+
static BOOL
GetDefaultClusterSize(LPWSTR szFs, PDWORD pClusterSize, PULARGE_INTEGER
TotalNumberOfBytes)
{
@@ -678,7 +707,16 @@ SHFormatDrive(HWND hwnd, UINT drive, UINT fmtID, UINT options)
Context.Result = FALSE;
Context.bFormattingNow = FALSE;
- result = DialogBoxParamW(shell32_hInstance, MAKEINTRESOURCEW(IDD_FORMAT_DRIVE), hwnd,
FormatDriveDlg, (LPARAM)&Context);
+ if (!IsSystemDrive(&Context))
+ {
+ result = DialogBoxParamW(shell32_hInstance, MAKEINTRESOURCEW(IDD_FORMAT_DRIVE),
hwnd, FormatDriveDlg, (LPARAM)&Context);
+ }
+ else
+ {
+ result = SHFMT_ERROR;
+ ShellMessageBoxW(shell32_hInstance, hwnd, MAKEINTRESOURCEW(IDS_NO_FORMAT),
MAKEINTRESOURCEW(IDS_NO_FORMAT_TITLE), MB_OK | MB_ICONWARNING);
+ TRACE("SHFormatDrive(): The provided drive for format is a system volume!
Aborting...\n");
+ }
return result;
}
diff --git a/dll/win32/shell32/lang/bg-BG.rc b/dll/win32/shell32/lang/bg-BG.rc
index c642f0de061..ce3e6ff8de2 100644
--- a/dll/win32/shell32/lang/bg-BG.rc
+++ b/dll/win32/shell32/lang/bg-BG.rc
@@ -840,6 +840,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Unable to display Run File dialog box (internal error)"
IDS_RUNDLG_BROWSE_ERROR "Unable to display Browse dialog box (internal
error)"
diff --git a/dll/win32/shell32/lang/ca-ES.rc b/dll/win32/shell32/lang/ca-ES.rc
index f7953ff9666..138a9f5fc96 100644
--- a/dll/win32/shell32/lang/ca-ES.rc
+++ b/dll/win32/shell32/lang/ca-ES.rc
@@ -839,6 +839,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Unable to display Run File dialog box (internal error)"
IDS_RUNDLG_BROWSE_ERROR "Unable to display Browse dialog box (internal
error)"
diff --git a/dll/win32/shell32/lang/cs-CZ.rc b/dll/win32/shell32/lang/cs-CZ.rc
index a551b668d1f..cd95ff4b6e6 100644
--- a/dll/win32/shell32/lang/cs-CZ.rc
+++ b/dll/win32/shell32/lang/cs-CZ.rc
@@ -845,6 +845,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Nelze zobrazit dialog Spustit soubor (interní chyba)"
IDS_RUNDLG_BROWSE_ERROR "Nelze zobrazit dialog Procházet (interní chyba)"
diff --git a/dll/win32/shell32/lang/da-DK.rc b/dll/win32/shell32/lang/da-DK.rc
index 5f5b46f2248..57ae99c7fc9 100644
--- a/dll/win32/shell32/lang/da-DK.rc
+++ b/dll/win32/shell32/lang/da-DK.rc
@@ -845,6 +845,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Unable to display Run File dialog box (internal error)"
IDS_RUNDLG_BROWSE_ERROR "Unable to display Browse dialog box (internal
error)"
diff --git a/dll/win32/shell32/lang/de-DE.rc b/dll/win32/shell32/lang/de-DE.rc
index 9c310a97399..528c04e095d 100644
--- a/dll/win32/shell32/lang/de-DE.rc
+++ b/dll/win32/shell32/lang/de-DE.rc
@@ -840,6 +840,10 @@ BEGIN
IDS_FORMAT_WARNING "ACHTUNG: Das Formatieren löscht ALLE Daten auf dem
Datenträger.\nKlicken Sie auf OK zum Formatieren. Klicken Sie auf ABBRECHEN zum
Beenden."
IDS_FORMAT_COMPLETE "Formatieren abgeschlossen."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Anzeigen der Datei Ausführen Dialogbox nicht möglich (interner
Fehler)"
IDS_RUNDLG_BROWSE_ERROR "Anzeigen der Durchsuchen Dialogbox nicht möglich
(interner Fehler)"
diff --git a/dll/win32/shell32/lang/el-GR.rc b/dll/win32/shell32/lang/el-GR.rc
index 07a4088cbb4..600de424db0 100644
--- a/dll/win32/shell32/lang/el-GR.rc
+++ b/dll/win32/shell32/lang/el-GR.rc
@@ -839,6 +839,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Unable to display Run File dialog box (internal error)"
IDS_RUNDLG_BROWSE_ERROR "Unable to display Browse dialog box (internal
error)"
diff --git a/dll/win32/shell32/lang/en-GB.rc b/dll/win32/shell32/lang/en-GB.rc
index 4504f73e5ba..2def5cbd315 100644
--- a/dll/win32/shell32/lang/en-GB.rc
+++ b/dll/win32/shell32/lang/en-GB.rc
@@ -839,6 +839,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Unable to display Run File dialog box (internal error)"
IDS_RUNDLG_BROWSE_ERROR "Unable to display Browse dialog box (internal
error)"
diff --git a/dll/win32/shell32/lang/en-US.rc b/dll/win32/shell32/lang/en-US.rc
index e3f31e5bdc3..1f21039a9c2 100644
--- a/dll/win32/shell32/lang/en-US.rc
+++ b/dll/win32/shell32/lang/en-US.rc
@@ -839,6 +839,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Unable to display Run File dialog box (internal error)"
IDS_RUNDLG_BROWSE_ERROR "Unable to display Browse dialog box (internal
error)"
diff --git a/dll/win32/shell32/lang/es-ES.rc b/dll/win32/shell32/lang/es-ES.rc
index efbd2b3cfe6..fa4ec30e78c 100644
--- a/dll/win32/shell32/lang/es-ES.rc
+++ b/dll/win32/shell32/lang/es-ES.rc
@@ -848,6 +848,10 @@ BEGIN
IDS_FORMAT_WARNING "ADVERTENCIA: Al dar formato se borrarán TODOS los datos del
disco.\nPara formatear, haga clic en Aceptar. Para salir, haga clic en Cancelar."
IDS_FORMAT_COMPLETE "Formato completo."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "No se pudo mostrar el diálogo Ejecutar (error interno)"
IDS_RUNDLG_BROWSE_ERROR "No se pudo mostrar el diálogo Examinar (error
interno)"
diff --git a/dll/win32/shell32/lang/et-EE.rc b/dll/win32/shell32/lang/et-EE.rc
index 0c3758ff233..ebab11727b0 100644
--- a/dll/win32/shell32/lang/et-EE.rc
+++ b/dll/win32/shell32/lang/et-EE.rc
@@ -846,6 +846,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Ei saanud kuvada Run faili dialoogiboksi (sisemine
viga)"
IDS_RUNDLG_BROWSE_ERROR "Ei saanud kuvada Sirvi dialoogiboksi (sisemine
viga)"
diff --git a/dll/win32/shell32/lang/fi-FI.rc b/dll/win32/shell32/lang/fi-FI.rc
index 87c536f52b5..f60145bdb85 100644
--- a/dll/win32/shell32/lang/fi-FI.rc
+++ b/dll/win32/shell32/lang/fi-FI.rc
@@ -839,6 +839,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Unable to display Run File dialog box (internal error)"
IDS_RUNDLG_BROWSE_ERROR "Unable to display Browse dialog box (internal
error)"
diff --git a/dll/win32/shell32/lang/fr-FR.rc b/dll/win32/shell32/lang/fr-FR.rc
index 475cbb8bcf6..2595d1763a7 100644
--- a/dll/win32/shell32/lang/fr-FR.rc
+++ b/dll/win32/shell32/lang/fr-FR.rc
@@ -839,6 +839,10 @@ BEGIN
IDS_FORMAT_WARNING "Attention: Le formatage effacera toutes les données
présentes sur ce disque.\nPour formater ce disque, cliquez sur OK. Pour quitter, cliquez
sur Annuler."
IDS_FORMAT_COMPLETE "Formatage terminé."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Impossible d'afficher la boîte de dialogue pour
l'exécution d'un fichier (erreur interne)"
IDS_RUNDLG_BROWSE_ERROR "Impossible d'afficher la boîte de dialogue pour la
recherche de fichier (erreur interne)"
diff --git a/dll/win32/shell32/lang/he-IL.rc b/dll/win32/shell32/lang/he-IL.rc
index ba856e74e6f..c2e751c67fe 100644
--- a/dll/win32/shell32/lang/he-IL.rc
+++ b/dll/win32/shell32/lang/he-IL.rc
@@ -841,6 +841,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "אתחול הושלם."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Unable to display Run File dialog box (internal error)"
IDS_RUNDLG_BROWSE_ERROR "Unable to display Browse dialog box (internal
error)"
diff --git a/dll/win32/shell32/lang/hi-IN.rc b/dll/win32/shell32/lang/hi-IN.rc
index bfe550b09f8..4791c9d2a6e 100644
--- a/dll/win32/shell32/lang/hi-IN.rc
+++ b/dll/win32/shell32/lang/hi-IN.rc
@@ -834,6 +834,10 @@ BEGIN
IDS_SHUTDOWN_TITLE "शटडाउन"
IDS_SHUTDOWN_PROMPT "क्या आप शटडाउन करना चाहते हैं?"
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "रन फ़ाइल डायलॉग बॉक्स डिस्प्ले करने में असमर्थ (आंतरिक
त्रुटि)"
IDS_RUNDLG_BROWSE_ERROR "ब्राउज़ डायलॉग बॉक्स डिस्प्ले करने में असमर्थ (आंतरिक
त्रुटि)"
diff --git a/dll/win32/shell32/lang/hu-HU.rc b/dll/win32/shell32/lang/hu-HU.rc
index 5e8c6c9f19d..2eb2d99df5a 100644
--- a/dll/win32/shell32/lang/hu-HU.rc
+++ b/dll/win32/shell32/lang/hu-HU.rc
@@ -838,6 +838,10 @@ BEGIN
IDS_FORMAT_WARNING "FIGYELEM: A formázás MINDEN adatot töröl a lemezről.\nA
lemez formázásához kattintson az OK gombra. A kilépéshez kattintson a MÉGSE gombra."
IDS_FORMAT_COMPLETE "A formázás kész."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "A futtatás párbeszédpanelt nem sikerült megjeleníteni (belső
hiba)"
IDS_RUNDLG_BROWSE_ERROR "A tallózás párbeszédpanelt nem sikerült megjeleníteni
(belső hiba)"
diff --git a/dll/win32/shell32/lang/id-ID.rc b/dll/win32/shell32/lang/id-ID.rc
index d14c5b51e06..357e39fbfa3 100644
--- a/dll/win32/shell32/lang/id-ID.rc
+++ b/dll/win32/shell32/lang/id-ID.rc
@@ -836,6 +836,10 @@ BEGIN
IDS_FORMAT_WARNING "PERINGATAN: Memformat akan menghapus SELURUH data dalam
disk.\nUntuk memformat disk, klik OK. untuk keluar, klik BATAL."
IDS_FORMAT_COMPLETE "Format Selesai."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Tidak bisa menampilkan kotak dialog Jalankan Berkas (kesalahan
internal)"
IDS_RUNDLG_BROWSE_ERROR "Tidak bisa menampilkan kotak dialog Jelajah (kesalahan
internal)"
diff --git a/dll/win32/shell32/lang/it-IT.rc b/dll/win32/shell32/lang/it-IT.rc
index b6beb84a9b8..250352f2e3a 100644
--- a/dll/win32/shell32/lang/it-IT.rc
+++ b/dll/win32/shell32/lang/it-IT.rc
@@ -839,6 +839,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Impossibile mostrare il dialogo Eseguire (errore
interno)"
IDS_RUNDLG_BROWSE_ERROR "Impossibile mostrare il dialogo sfoglia (errore
interno)"
diff --git a/dll/win32/shell32/lang/ja-JP.rc b/dll/win32/shell32/lang/ja-JP.rc
index 7da117b3e6a..15a95270956 100644
--- a/dll/win32/shell32/lang/ja-JP.rc
+++ b/dll/win32/shell32/lang/ja-JP.rc
@@ -836,6 +836,10 @@ BEGIN
IDS_FORMAT_WARNING "警告:
フォーマットはこのディスクの「すべての」データを消去します。\nフォーマットするならOKをクリック。終了するにはキャンセルをクリックして下さい。"
IDS_FORMAT_COMPLETE "フォーマット完了。"
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "「ファイルの実行」ダイアログを表示できませんでした (内部エラー)"
IDS_RUNDLG_BROWSE_ERROR "「閲覧」ダイアログを表示できませんでした (内部エラー)"
diff --git a/dll/win32/shell32/lang/ko-KR.rc b/dll/win32/shell32/lang/ko-KR.rc
index ca1e9be30ca..db2e33b4091 100644
--- a/dll/win32/shell32/lang/ko-KR.rc
+++ b/dll/win32/shell32/lang/ko-KR.rc
@@ -839,6 +839,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Unable to display Run File dialog box (internal error)"
IDS_RUNDLG_BROWSE_ERROR "Unable to display Browse dialog box (internal
error)"
diff --git a/dll/win32/shell32/lang/nl-NL.rc b/dll/win32/shell32/lang/nl-NL.rc
index bc5e2a318e2..942dca8eef8 100644
--- a/dll/win32/shell32/lang/nl-NL.rc
+++ b/dll/win32/shell32/lang/nl-NL.rc
@@ -839,6 +839,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Unable to display Run File dialog box (internal error)"
IDS_RUNDLG_BROWSE_ERROR "Unable to display Browse dialog box (internal
error)"
diff --git a/dll/win32/shell32/lang/no-NO.rc b/dll/win32/shell32/lang/no-NO.rc
index 53b9cd986b1..8106e21ee47 100644
--- a/dll/win32/shell32/lang/no-NO.rc
+++ b/dll/win32/shell32/lang/no-NO.rc
@@ -839,6 +839,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Unable to display Run File dialog box (internal error)"
IDS_RUNDLG_BROWSE_ERROR "Unable to display Browse dialog box (internal
error)"
diff --git a/dll/win32/shell32/lang/pl-PL.rc b/dll/win32/shell32/lang/pl-PL.rc
index 18b64688e01..b7028b2715e 100644
--- a/dll/win32/shell32/lang/pl-PL.rc
+++ b/dll/win32/shell32/lang/pl-PL.rc
@@ -845,6 +845,10 @@ BEGIN
IDS_FORMAT_WARNING "OSTRZEŻENIE: Formatowanie wymaże WSZYSTKIE dane na tym
dysku.\nWybierz przycisk OK, aby sformatować dysk lub przycisk ANULUJ, aby zamknąć."
IDS_FORMAT_COMPLETE "Formatowanie zakończone."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Nie można wyświetlić okna Uruchom (błąd wewnętrzny)"
IDS_RUNDLG_BROWSE_ERROR "Nie można wyświetlić okna Przeglądaj (błąd
wewnętrzny)"
diff --git a/dll/win32/shell32/lang/pt-BR.rc b/dll/win32/shell32/lang/pt-BR.rc
index 92e471b8a6c..3962f37ebe6 100644
--- a/dll/win32/shell32/lang/pt-BR.rc
+++ b/dll/win32/shell32/lang/pt-BR.rc
@@ -839,6 +839,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Unable to display Run File dialog box (internal error)"
IDS_RUNDLG_BROWSE_ERROR "Unable to display Browse dialog box (internal
error)"
diff --git a/dll/win32/shell32/lang/pt-PT.rc b/dll/win32/shell32/lang/pt-PT.rc
index dc40de74c24..2c7a920375f 100644
--- a/dll/win32/shell32/lang/pt-PT.rc
+++ b/dll/win32/shell32/lang/pt-PT.rc
@@ -839,6 +839,10 @@ BEGIN
IDS_FORMAT_WARNING "ATENÇÃO: A formatação irá apagar TODOS os dados deste
disco.\nPara formatar o disco, clique em OK. Para sair, clique em CANCELAR."
IDS_FORMAT_COMPLETE "Formatação concluida."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Não é possível abrir a caixa de diálogo Executar arquivo (erro
interno)"
IDS_RUNDLG_BROWSE_ERROR "Não é possível abrir a caixa de diálogo Procurar
arquivo (erro interno)"
diff --git a/dll/win32/shell32/lang/ro-RO.rc b/dll/win32/shell32/lang/ro-RO.rc
index fd6ce151637..e0cb0a19761 100644
--- a/dll/win32/shell32/lang/ro-RO.rc
+++ b/dll/win32/shell32/lang/ro-RO.rc
@@ -841,6 +841,10 @@ BEGIN
IDS_FORMAT_WARNING "AVERTISMENT: Formatarea va șterge TOATE datele de pe acest
disc.\nConfirmați pentru a formata, anulați pentru a ieși."
IDS_FORMAT_COMPLETE "Formatare completă."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "„Executare fișier” nu a putut fi deschis (eroare
internă)"
IDS_RUNDLG_BROWSE_ERROR "„Specificare fișiere” nu a putut fi deschisă (eroare
internă)"
diff --git a/dll/win32/shell32/lang/ru-RU.rc b/dll/win32/shell32/lang/ru-RU.rc
index a4f65a4bfa7..06ff4884d33 100644
--- a/dll/win32/shell32/lang/ru-RU.rc
+++ b/dll/win32/shell32/lang/ru-RU.rc
@@ -846,6 +846,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Невозможно отобразить диалоговое окно Выполнить (внутренняя
ошибка)"
IDS_RUNDLG_BROWSE_ERROR "Невозможно отобразить диалоговое окно Обзор (внутренняя
ошибка)"
diff --git a/dll/win32/shell32/lang/sk-SK.rc b/dll/win32/shell32/lang/sk-SK.rc
index 58aad4e2548..342987f512e 100644
--- a/dll/win32/shell32/lang/sk-SK.rc
+++ b/dll/win32/shell32/lang/sk-SK.rc
@@ -839,6 +839,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Nemožno zobraziť dialogové okno Spustiť súbor (vnútorná
chyba)"
IDS_RUNDLG_BROWSE_ERROR "Nemožno zobraziť dialogové okno Prehľadávať (vnútorná
chyba)"
diff --git a/dll/win32/shell32/lang/sl-SI.rc b/dll/win32/shell32/lang/sl-SI.rc
index ef25cff8d69..11b22a624dd 100644
--- a/dll/win32/shell32/lang/sl-SI.rc
+++ b/dll/win32/shell32/lang/sl-SI.rc
@@ -839,6 +839,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Unable to display Run File dialog box (internal error)"
IDS_RUNDLG_BROWSE_ERROR "Unable to display Browse dialog box (internal
error)"
diff --git a/dll/win32/shell32/lang/sq-AL.rc b/dll/win32/shell32/lang/sq-AL.rc
index a59e5aa9591..c4a429bdb74 100644
--- a/dll/win32/shell32/lang/sq-AL.rc
+++ b/dll/win32/shell32/lang/sq-AL.rc
@@ -843,6 +843,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Në pamundësi për të shfaqur kutinë dialogut ekzekuto (gabim i
brendshëm)"
IDS_RUNDLG_BROWSE_ERROR "Në pamundësi për të shfaqur kutinë dialogut Shfleto
(gabim i brendshëm)"
diff --git a/dll/win32/shell32/lang/sv-SE.rc b/dll/win32/shell32/lang/sv-SE.rc
index cf25c557f5d..f2e5dfa15b1 100644
--- a/dll/win32/shell32/lang/sv-SE.rc
+++ b/dll/win32/shell32/lang/sv-SE.rc
@@ -839,6 +839,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Kunde inte visa dialogen Kör fil (internt fel)"
IDS_RUNDLG_BROWSE_ERROR "Kunde inte visa dialogen Bläddra (internt fel)"
diff --git a/dll/win32/shell32/lang/tr-TR.rc b/dll/win32/shell32/lang/tr-TR.rc
index f00df22ce1a..886b148d3d7 100644
--- a/dll/win32/shell32/lang/tr-TR.rc
+++ b/dll/win32/shell32/lang/tr-TR.rc
@@ -841,6 +841,10 @@ BEGIN
IDS_FORMAT_WARNING "WARNING: Formatting will erase ALL data on this disk.\nTo
format the disk, click OK. To quit, click CANCEL."
IDS_FORMAT_COMPLETE "Format Complete."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Kütük Çalıştır iletişim kutusu görüntülenemiyor (iç
yanlışlık)."
IDS_RUNDLG_BROWSE_ERROR "Göz At iletişim kutusu görüntülenemiyor (iç
yanlışlık)."
diff --git a/dll/win32/shell32/lang/uk-UA.rc b/dll/win32/shell32/lang/uk-UA.rc
index 3f4d9173698..62dffc39e24 100644
--- a/dll/win32/shell32/lang/uk-UA.rc
+++ b/dll/win32/shell32/lang/uk-UA.rc
@@ -839,6 +839,10 @@ BEGIN
IDS_FORMAT_WARNING "УВАГА: Форматування видалить ВСЮ інформацію на диску.\nЩоб
розпочати форматування, натисніть OK. Щоб вийти, натисніть СКАСУВАТИ."
IDS_FORMAT_COMPLETE "Форматування завершено."
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "Неможливо відобразити діалог запуску файлу (внутрішня
помилка)"
IDS_RUNDLG_BROWSE_ERROR "Неможливо відобразити діалог огляду (внутрішня
помилка)"
diff --git a/dll/win32/shell32/lang/zh-CN.rc b/dll/win32/shell32/lang/zh-CN.rc
index 23368203ef5..3dddfd6ded0 100644
--- a/dll/win32/shell32/lang/zh-CN.rc
+++ b/dll/win32/shell32/lang/zh-CN.rc
@@ -847,6 +847,10 @@ BEGIN
IDS_FORMAT_WARNING "警告: 格式化将会擦除磁盘上的所有数据。\n想要格式化这个磁盘, 请点击确定。若想退出,请点击返回。"
IDS_FORMAT_COMPLETE "格式化完成"
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "无法显示运行文件对话框 (内部错误)"
IDS_RUNDLG_BROWSE_ERROR "无法显示浏览对话框 (内部错误)"
diff --git a/dll/win32/shell32/lang/zh-TW.rc b/dll/win32/shell32/lang/zh-TW.rc
index e923db6b33c..234749027ab 100644
--- a/dll/win32/shell32/lang/zh-TW.rc
+++ b/dll/win32/shell32/lang/zh-TW.rc
@@ -847,6 +847,10 @@ BEGIN
IDS_FORMAT_WARNING "警告: 格式化將會清除磁碟上的所有數據。\n想要格式化這個磁碟, 請按 [確定]。若想退出,請按
[返回]。"
IDS_FORMAT_COMPLETE "格式化完成"
+ /* Warning format system drive dialog strings */
+ IDS_NO_FORMAT_TITLE "Cannot format this volume"
+ IDS_NO_FORMAT "This volume cannot be formatted! It contains important system
files in order for ReactOS to run."
+
/* Run File dialog */
IDS_RUNDLG_ERROR "無法顯示執行文件對話方塊 (內部錯誤)"
IDS_RUNDLG_BROWSE_ERROR "無法顯示瀏覽對話方塊 (內部錯誤)"
diff --git a/dll/win32/shell32/shresdef.h b/dll/win32/shell32/shresdef.h
index 01775810278..f7229bb66b5 100644
--- a/dll/win32/shell32/shresdef.h
+++ b/dll/win32/shell32/shresdef.h
@@ -197,6 +197,10 @@
#define IDS_FORMAT_WARNING 185
#define IDS_FORMAT_COMPLETE 186
+/* Warning format system drive dialog strings */
+#define IDS_NO_FORMAT_TITLE 188
+#define IDS_NO_FORMAT 189
+
#define IDS_UNKNOWN_APP 190
#define IDS_EXE_DESCRIPTION 191