diff --git a/TrustedUninstaller.CLI/TrustedUninstaller.CLI.csproj b/TrustedUninstaller.CLI/TrustedUninstaller.CLI.csproj
index cd96ecc..4c5549b 100644
--- a/TrustedUninstaller.CLI/TrustedUninstaller.CLI.csproj
+++ b/TrustedUninstaller.CLI/TrustedUninstaller.CLI.csproj
@@ -102,6 +102,9 @@
+
+ ..\Windows.winmd
+
diff --git a/TrustedUninstaller.Shared/Actions/AppxAction.cs b/TrustedUninstaller.Shared/Actions/AppxAction.cs
index 6e966d6..73bfa6e 100644
--- a/TrustedUninstaller.Shared/Actions/AppxAction.cs
+++ b/TrustedUninstaller.Shared/Actions/AppxAction.cs
@@ -1,8 +1,6 @@
using System;
using System.Linq;
using System.Threading.Tasks;
-using Windows.ApplicationModel;
-using Windows.Management.Deployment;
using TrustedUninstaller.Shared.Exceptions;
using TrustedUninstaller.Shared.Tasks;
using YamlDotNet.Serialization;
@@ -13,7 +11,6 @@ using System.Threading;
namespace TrustedUninstaller.Shared.Actions
{
- // Integrate ame-assassin later
internal class AppxAction : ITaskAction
{
public enum AppxOperation
@@ -48,12 +45,14 @@ namespace TrustedUninstaller.Shared.Actions
public string ErrorString() => $"AppxAction failed to remove '{Name}'.";
+ /*
private Package GetPackage()
{
var packageManager = new PackageManager();
return packageManager.FindPackages().FirstOrDefault(package => package.Id.Name == Name);
}
+ */
public UninstallTaskStatus GetStatus()
{
if (InProgress) return UninstallTaskStatus.InProgress;
diff --git a/TrustedUninstaller.Shared/Actions/ServiceAction.cs b/TrustedUninstaller.Shared/Actions/ServiceAction.cs
index 306cec8..9219cd1 100644
--- a/TrustedUninstaller.Shared/Actions/ServiceAction.cs
+++ b/TrustedUninstaller.Shared/Actions/ServiceAction.cs
@@ -110,10 +110,12 @@ namespace TrustedUninstaller.Shared.Actions
return Operation switch
{
ServiceOperation.Stop =>
+ serviceController == null ||
serviceController?.Status == ServiceControllerStatus.Stopped
|| serviceController?.Status == ServiceControllerStatus.StopPending ?
UninstallTaskStatus.Completed : UninstallTaskStatus.ToDo,
ServiceOperation.Continue =>
+ serviceController == null ||
serviceController?.Status == ServiceControllerStatus.Running
|| serviceController?.Status == ServiceControllerStatus.ContinuePending ?
UninstallTaskStatus.Completed : UninstallTaskStatus.ToDo,
@@ -122,6 +124,7 @@ namespace TrustedUninstaller.Shared.Actions
|| serviceController?.Status == ServiceControllerStatus.Running ?
UninstallTaskStatus.Completed : UninstallTaskStatus.ToDo,
ServiceOperation.Pause =>
+ serviceController == null ||
serviceController?.Status == ServiceControllerStatus.Paused
|| serviceController?.Status == ServiceControllerStatus.PausePending ?
UninstallTaskStatus.Completed : UninstallTaskStatus.ToDo,
diff --git a/TrustedUninstaller.Shared/Actions/SystemPackageAction.cs b/TrustedUninstaller.Shared/Actions/SystemPackageAction.cs
index 4400176..756748a 100644
--- a/TrustedUninstaller.Shared/Actions/SystemPackageAction.cs
+++ b/TrustedUninstaller.Shared/Actions/SystemPackageAction.cs
@@ -1,8 +1,6 @@
using System;
using System.Linq;
using System.Threading.Tasks;
-using Windows.ApplicationModel;
-using Windows.Management.Deployment;
using TrustedUninstaller.Shared.Exceptions;
using TrustedUninstaller.Shared.Tasks;
using YamlDotNet.Serialization;
@@ -13,7 +11,6 @@ using System.Threading;
namespace TrustedUninstaller.Shared.Actions
{
- // Integrate ame-assassin later
internal class SystemPackageAction : ITaskAction
{
public enum Architecture