Zero Install .NET API 2.20.0
ZeroInstall.DesktopIntegration.Windows.UninstallEntry Class Reference

Manages uninstall registry entries on Windows systems. More...

Static Public Member Functions

static void Register (FeedTarget target, IIconStore iconStore, bool machineWide)
 Adds an entry to the list of uninstallable applications. More...
 
static void Register (string id, string[] uninstallCommand, string name, Uri? homepage=null, string? iconPath=null, string? version=null, long? size=null, bool machineWide=false)
 Adds an entry to the list of uninstallable applications. More...
 
static void Unregister (FeedUri uri, bool machineWide)
 Removes an entry from the list of uninstallable applications. More...
 
static void Unregister (string id, bool machineWide)
 Removes an entry from the list of uninstallable applications. More...
 

Detailed Description

Manages uninstall registry entries on Windows systems.

Member Function Documentation

◆ Register() [1/2]

static void ZeroInstall.DesktopIntegration.Windows.UninstallEntry.Register ( FeedTarget  target,
IIconStore  iconStore,
bool  machineWide 
)
static

Adds an entry to the list of uninstallable applications.

Parameters
targetThe application being added.
machineWideApply the registration machine-wide instead of just for the current user.
iconStoreStores icon files downloaded from the web as local files.
Exceptions
OperationCanceledExceptionThe user canceled the task.
IOExceptionA problem occurred while writing to the filesystem or registry.
WebExceptionA problem occurred while downloading additional data (such as icons).
UnauthorizedAccessExceptionWrite access to the filesystem or registry is not permitted.

◆ Register() [2/2]

static void ZeroInstall.DesktopIntegration.Windows.UninstallEntry.Register ( string  id,
string[]  uninstallCommand,
string  name,
Uri?  homepage = null,
string?  iconPath = null,
string?  version = null,
long?  size = null,
bool  machineWide = false 
)
inlinestatic

Adds an entry to the list of uninstallable applications.

Parameters
idThe ID of the entry to create.
uninstallCommandThe command-line to invoke for uninstalling the application.
nameThe name of the application.
homepageThe homepage of the application.
iconPathThe path of an icon file.
versionThe application's current version.
sizeThe application's size in bytes.
machineWideApply the registration machine-wide instead of just for the current user.
Exceptions
IOExceptionA problem occurred while writing to the filesystem or registry.
UnauthorizedAccessExceptionWrite access to the filesystem or registry is not permitted.

◆ Unregister() [1/2]

static void ZeroInstall.DesktopIntegration.Windows.UninstallEntry.Unregister ( FeedUri  uri,
bool  machineWide 
)
static

Removes an entry from the list of uninstallable applications.

Parameters
uriThe feed to be removed.
machineWideApply the registration machine-wide instead of just for the current user.
Exceptions
IOExceptionA problem occurred while writing to the filesystem or registry.
UnauthorizedAccessExceptionWrite access to the filesystem or registry is not permitted.

◆ Unregister() [2/2]

static void ZeroInstall.DesktopIntegration.Windows.UninstallEntry.Unregister ( string  id,
bool  machineWide 
)
inlinestatic

Removes an entry from the list of uninstallable applications.

Parameters
idThe ID of the entry to be removed.
machineWideApply the registration machine-wide instead of just for the current user.
Exceptions
IOExceptionA problem occurred while writing to the filesystem or registry.
UnauthorizedAccessExceptionWrite access to the filesystem or registry is not permitted.

The documentation for this class was generated from the following file: