File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,9 @@ Package GetSparsePackage()
209209HRESULT NppShell::Installer::RegisterSparsePackage ()
210210{
211211 if (::GetSystemMetrics (SM_CLEANBOOT) > 0 )
212+ {
212213 return S_FALSE; // Otherwise we will get an unhandled exception later due to HRESULT 0x8007043c (ERROR_NOT_SAFEBOOT_SERVICE).
214+ }
213215
214216 PackageManager packageManager;
215217 AddPackageOptions options;
@@ -236,7 +238,9 @@ HRESULT NppShell::Installer::RegisterSparsePackage()
236238HRESULT NppShell::Installer::UnregisterSparsePackage ()
237239{
238240 if (::GetSystemMetrics (SM_CLEANBOOT) > 0 )
241+ {
239242 return S_FALSE; // Only to speed up things a bit here. (code in the following GetSparsePackage() is safe against the ERROR_NOT_SAFEBOOT_SERVICE)
243+ }
240244
241245 PackageManager packageManager;
242246 IIterable<Package> packages;
@@ -298,7 +302,9 @@ HRESULT NppShell::Installer::UnregisterOldContextMenu()
298302void ReRegisterSparsePackage ()
299303{
300304 if (::GetSystemMetrics (SM_CLEANBOOT) > 0 )
305+ {
301306 return ; // Sparse package reg/unreg cannot be done in the Windows OS SafeMode.
307+ }
302308
303309 winrt::init_apartment ();
304310
You can’t perform that action at this time.
0 commit comments