Skip to main content

UpdateExe.Apply Method

Declaring Type: UpdateExe
Namespace: Velopack
Assembly: Velopack
Assembly Version: 0.0.1298+ed8600e

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, uint waitPid, bool restart, [Nullable(Mono.Cecil.CustomAttributeArgument[])]string[] restartArgs = 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.

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.

Exceptions

Exception

Thrown if Update.exe does not initialize properly.


Documentation generated by MdDocs