Skip to main content

UpdateExe.Apply Method

Declaring Type: UpdateExe
Namespace: Velopack
Assembly: Velopack
Assembly Version: 0.0.942+a011233

Runs Update.exe in the current working directory to apply updates, optionally restarting the application.

public static void Apply(IVelopackLocator locator, VelopackAsset toApply, bool silent, bool restart, string[] restartArgs = null, ILogger logger = null);

Parameters

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.

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.

logger ILogger

The logger to use for diagnostic messages

Exceptions

Exception

Thrown if Update.exe does not initialize properly.


Documentation generated by MdDocs