diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/OS')
| -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> |
