UpdateExe class
Namespace: Velopack
A static helper class to assist in running Update.exe CLI commands. You probably should not invoke this directly,
instead you should use the relevant methods on UpdateManager. For example:
ApplyUpdatesAndExit(VelopackAsset), or ApplyUpdatesAndRestart.
public static class UpdateExe
Methods
| Method | Summary |
|---|---|
Start | Runs Update.exe in the current working directory with the 'start' command which will simply start the application. |
Apply | Runs Update.exe in the current working directory to apply updates, optionally restarting the application. |
Start(locator, waitPid, startArgs)
public static void Start(IVelopackLocator? locator = null, uint waitPid = 0, string[]? startArgs = null)
Runs Update.exe in the current working directory with the 'start' command which will simply start the application.
Combined with the waitForExit parameter, this can be used to gracefully restart the application.
Parameters
| Name | Type | Description |
|---|---|---|
locator | IVelopackLocator | The locator to use to find the path to Update.exe and the packages directory. |
waitPid | uint | Optionally wait for the specified process to exit before continuing. |
startArgs | string[] | The arguments to pass to the application when it is restarted. |
Apply(locator, toApply, silent, waitPid, restart, restartArgs)
public static void Apply(IVelopackLocator? locator, VelopackAsset? toApply, bool silent, uint waitPid, bool restart, string[]? restartArgs = null)
Runs Update.exe in the current working directory to apply updates, optionally restarting the application.
Parameters
| Name | Type | Description |
|---|---|---|
locator | IVelopackLocator | The locator to use to find the path to Update.exe and the packages directory. |
toApply | VelopackAsset | The update package you wish to apply, can be left null. |
silent | bool | If true, no dialogs will be shown during the update process. This could result in an update failing to install, such as when we need to ask the user for permission to install a new framework dependency. |
waitPid | uint | Optionally wait for the specified process to exit before continuing. |
restart | bool | If true, restarts the application after updates are applied (or if they failed) |
restartArgs | string[] | The arguments to pass to the application when it is restarted. |
Generated from Velopack 1.1.1