diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-03-03 16:23:06 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-03-03 16:23:06 +0200 |
| commit | 8b320dd2af9ea1d637f1d046279bd33379283891 (patch) | |
| tree | 3d37aa4aa69e7ea6fb7bed9bd610a6867a61f27f /Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs | |
| parent | 89dc1ab7933a95bd305f6c82840de922a5a08d33 (diff) | |
| download | Tango-8b320dd2af9ea1d637f1d046279bd33379283891.tar.gz Tango-8b320dd2af9ea1d637f1d046279bd33379283891.zip | |
PPC v1.0.4
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs | 15 |
1 files changed, 15 insertions, 0 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 9e44a5028..1dbb57a8b 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs @@ -131,6 +131,21 @@ namespace Tango.PPC.Common.OS { CmdCommand cmd = new CmdCommand("tzutil", $"/s \"{timeZone.Id}\""); await cmd.Run(); + + try + { + cmd = new CmdCommand("sc.exe", "config W32Time start=auto"); + cmd.Timeout = TimeSpan.FromSeconds(10); + await cmd.Run(); + + cmd = new CmdCommand("net", "start W32Time"); + cmd.Timeout = TimeSpan.FromSeconds(10); + await cmd.Run(); + + cmd = new CmdCommand("w32tm", $"/resync"); + await cmd.Run(); + } + catch { } } /// <summary> |
