File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,9 @@ Package GetSparsePackage()
209
209
HRESULT NppShell::Installer::RegisterSparsePackage ()
210
210
{
211
211
if (::GetSystemMetrics (SM_CLEANBOOT) > 0 )
212
+ {
212
213
return S_FALSE; // Otherwise we will get an unhandled exception later due to HRESULT 0x8007043c (ERROR_NOT_SAFEBOOT_SERVICE).
214
+ }
213
215
214
216
PackageManager packageManager;
215
217
AddPackageOptions options;
@@ -236,7 +238,9 @@ HRESULT NppShell::Installer::RegisterSparsePackage()
236
238
HRESULT NppShell::Installer::UnregisterSparsePackage ()
237
239
{
238
240
if (::GetSystemMetrics (SM_CLEANBOOT) > 0 )
241
+ {
239
242
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
+ }
240
244
241
245
PackageManager packageManager;
242
246
IIterable<Package> packages;
@@ -298,7 +302,9 @@ HRESULT NppShell::Installer::UnregisterOldContextMenu()
298
302
void ReRegisterSparsePackage ()
299
303
{
300
304
if (::GetSystemMetrics (SM_CLEANBOOT) > 0 )
305
+ {
301
306
return ; // Sparse package reg/unreg cannot be done in the Windows OS SafeMode.
307
+ }
302
308
303
309
winrt::init_apartment ();
304
310
You can’t perform that action at this time.
0 commit comments