diff --git a/.github/actions/spelling/allow/allow.txt b/.github/actions/spelling/allow/allow.txt
index 630edfebce7..a936b3df359 100644
--- a/.github/actions/spelling/allow/allow.txt
+++ b/.github/actions/spelling/allow/allow.txt
@@ -11,6 +11,7 @@ colorbrewer
commandlines
consvc
copyable
+CText
dalet
dcs
deselection
diff --git a/src/cascadia/TerminalConnection/ConptyConnection.cpp b/src/cascadia/TerminalConnection/ConptyConnection.cpp
index 0a0b26aa934..1f85e5c0e34 100644
--- a/src/cascadia/TerminalConnection/ConptyConnection.cpp
+++ b/src/cascadia/TerminalConnection/ConptyConnection.cpp
@@ -428,6 +428,21 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
TerminalOutput.raise(L"\r\n");
TerminalOutput.raise(badPathText);
}
+ // If the requested action requires elevation, display appropriate message
+ else if (hr == HRESULT_FROM_WIN32(ERROR_ELEVATION_REQUIRED))
+ {
+ const auto elevationText = RS_(L"ElevationRequired");
+ TerminalOutput.raise(L"\r\n");
+ TerminalOutput.raise(elevationText);
+ }
+ // If the requested executable was not found, display appropriate message
+ else if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND))
+ {
+ const auto fileNotFoundText = RS_(L"FileNotFound");
+ TerminalOutput.raise(L"\r\n");
+ TerminalOutput.raise(fileNotFoundText);
+ }
+
_transitionToState(ConnectionState::Failed);
diff --git a/src/cascadia/TerminalConnection/Resources/en-US/Resources.resw b/src/cascadia/TerminalConnection/Resources/en-US/Resources.resw
index 3532e310491..82c7291a607 100644
--- a/src/cascadia/TerminalConnection/Resources/en-US/Resources.resw
+++ b/src/cascadia/TerminalConnection/Resources/en-US/Resources.resw
@@ -209,7 +209,7 @@
You can now close this terminal with Ctrl+D, or press Enter to restart.
- "Ctrl+D" and "Enter" represent keys the user will press (control+D and Enter).
+ "Ctrl+D" and "Enter" represent keys the user will press (control+D and Enter).
[error {0} when launching `{1}']
@@ -220,4 +220,10 @@
Could not access starting directory "{0}"
The first argument {0} is a path to a directory on the filesystem, as provided by the user.
-
+
+ The requested operation requires elevation.
+
+
+ The system cannot find the file specified.
+
+
\ No newline at end of file