Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relaunch application arguments provision added. #78

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/NAppUpdate.Framework/Common/NauConfigurations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace NAppUpdate.Framework.Common
[Serializable]
public class NauConfigurations
{
public string TempFolder { get; set; }
public string TempFolder { get; set; }
public string RelaunchAppArgs { get; set; }

/// <summary>
/// Path to the backup folder used by the update process
Expand Down
3 changes: 3 additions & 0 deletions src/NAppUpdate.Updater/AppStart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ private static void Main()
tempFolder = dto.Configs.TempFolder;
string backupFolder = dto.Configs.BackupFolder;
bool relaunchApp = dto.RelaunchApplication;
string relaunchAppArgs = dto.Configs.RelaunchAppArgs;

if (!string.IsNullOrEmpty(dto.AppPath)) logFile = Path.Combine(Path.GetDirectoryName(dto.AppPath), @"NauUpdate.log"); // now we can log to a more accessible location

Expand Down Expand Up @@ -163,6 +164,7 @@ private static void Main()
UseShellExecute = false,
WorkingDirectory = appDir,
FileName = appPath,
Arguments= relaunchAppArgs,
};
}
else
Expand All @@ -172,6 +174,7 @@ private static void Main()
UseShellExecute = true,
WorkingDirectory = appDir,
FileName = appPath,
Arguments = relaunchAppArgs,
};
}

Expand Down