aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteAssistance
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-12-17 16:59:13 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-12-17 16:59:13 +0200
commit79f12332efed3507c2316eef9698e5766be31ff8 (patch)
treee450cc3f32399880934f7b72b7165f084b0c0df3 /Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteAssistance
parent925e671d764466f518270e07e21d35e15c838c61 (diff)
downloadTango-79f12332efed3507c2316eef9698e5766be31ff8.tar.gz
Tango-79f12332efed3507c2316eef9698e5766be31ff8.zip
Done some work on remote assistance installation.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteAssistance')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteAssistance/DefaultRemoteAssistanceProvider.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteAssistance/DefaultRemoteAssistanceProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteAssistance/DefaultRemoteAssistanceProvider.cs
index 1a0eea2bd..25ae2dcf7 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteAssistance/DefaultRemoteAssistanceProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteAssistance/DefaultRemoteAssistanceProvider.cs
@@ -110,6 +110,30 @@ namespace Tango.PPC.Common.RemoteAssistance
CmdCommand command = new CmdCommand("msiexec.exe", $"/i \"{_installer_path}\" /qn CUSTOMCONFIGID=ke43ann APITOKEN=4765529-gon1LwO1N1TTrlLI21ji ASSIGNMENTOPTIONS=\" --reassign --alias {"TANGO-" + machineSerialNumber} --grant-easy-access\"");
await command.Run();
+
+ bool exist = false;
+
+ for (int i = 0; i < 6; i++)
+ {
+ await Task.Delay(1000);
+ command = new CmdCommand("sc.exe", "query TeamViewer");
+ try
+ {
+ await command.Run();
+ exist = true;
+ break;
+ }
+ catch { }
+ }
+
+ if (exist)
+ {
+ await DisableRemoteAssistance();
+ }
+ else
+ {
+ throw new ApplicationException("The remote assistance service was installed but could not be found.");
+ }
}
catch (Exception ex)
{