コード例 #1
0
        private void LaunchUpdater()
        {
            var ticks = (uint)Environment.TickCount;
            var key   = ticks & 0xFFFF_0000;

            var argumentBuilder = new ArgumentBuilder()
                                  .Append("T", ticks.ToString())
                                  .Append("BootVersion", XIVGame.GetLocalBootVer())
                                  .Append("CallerWindow", _windowHwnd.ToString())
                                  .Append("GameVersion", XIVGame.GetLocalGameVer())
                                  .Append("IsSteam", "0")
                                  .Append("NextExe", Path.Combine(Settings.GetGamePath(), "game", "ffxiv.exe"))
                                  .Append("ShowMode", "2")
                                  .Append("UserPath", _userPath);

            Debug.WriteLine($"Launching ffxivupdater with key {key}: {argumentBuilder.Build()}");

            var process = new Process
            {
                StartInfo = new ProcessStartInfo
                {
                    FileName  = Path.Combine(_userPath, "downloads", "ffxivupdater.exe"),
                    Arguments = argumentBuilder.BuildEncrypted(key)
                }
            };

            process.Start();
        }