aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/OS
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-02-24 19:04:47 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-02-24 19:04:47 +0200
commit40746c60fed9e70f3cb7f6f12f55595a77a1adfa (patch)
tree815a77a25888aceed48d15a9ce2f977e0d9ee845 /Software/Visual_Studio/PPC/Tango.PPC.Common/OS
parent64b768178dc9e64293a52c1b6d2631709af9502a (diff)
downloadTango-40746c60fed9e70f3cb7f6f12f55595a77a1adfa.tar.gz
Tango-40746c60fed9e70f3cb7f6f12f55595a77a1adfa.zip
Fixed PPC and Machine Studio issues before next release.
Started working on Advanced Installer libraries.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/OS')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs
index 650cda9ff..9e44a5028 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs
@@ -5,13 +5,13 @@ using System.Management;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
-using Tango.PPC.Common.Scripting;
namespace Tango.PPC.Common.OS
{
using System.Collections.ObjectModel;
using System.Diagnostics;
using Tango.Core;
+ using Tango.Core.Components;
using SLID = Guid; //SLID id declaration as typedef GUID SLID; in slpublic.h
/// <summary>
@@ -83,9 +83,16 @@ namespace Tango.PPC.Common.OS
CmdCommand command = new CmdCommand("cscript", $"C:\\Windows\\System32\\slmgr.vbs -ipk {activationKey}");
await command.Run();
- await Task.Delay(10000);
+ bool activated = false;
- if (!(await IsActivated()))
+ for (int i = 0; i < 10; i++)
+ {
+ await Task.Delay(2000);
+ activated = await IsActivated();
+ if (activated) break;
+ }
+
+ if (!activated)
{
throw new ApplicationException("The activation was completed but activation status returned a false response.");
}