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

Contains control logic for applying AccessPoints.AppAlias on Windows systems. More...

Static Public Member Functions

static void Create (FeedTarget target, string? command, string aliasName, IIconStore iconStore, bool machineWide)
 Creates an application alias in the current system. More...
 
static void Remove (string aliasName, bool machineWide)
 Removes an application alias from the current system. More...
 
static string GetStubDir (bool machineWide)
 Returns the path of the directory used to store alias stub EXEs. More...
 

Static Public Attributes

const string RegKeyAppPaths = @"Software\Microsoft\Windows\CurrentVersion\App Paths"
 The HKCU/HKLM registry key for storing application lookup paths.
 

Detailed Description

Contains control logic for applying AccessPoints.AppAlias on Windows systems.

Member Function Documentation

◆ Create()

static void ZeroInstall.DesktopIntegration.Windows.AppAlias.Create ( FeedTarget  target,
string?  command,
string  aliasName,
IIconStore  iconStore,
bool  machineWide 
)
inlinestatic

Creates an application alias in the current system.

Parameters
targetThe application being integrated.
commandThe command within target the alias shall point to; can be null.
aliasNameThe name of the alias to be created.
machineWideCreate the alias 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.

◆ GetStubDir()

static string ZeroInstall.DesktopIntegration.Windows.AppAlias.GetStubDir ( bool  machineWide)
static

Returns the path of the directory used to store alias stub EXEs.

Parameters
machineWidetrue for a machine-wide directory; false for a directory just for the current user.

◆ Remove()

static void ZeroInstall.DesktopIntegration.Windows.AppAlias.Remove ( string  aliasName,
bool  machineWide 
)
inlinestatic

Removes an application alias from the current system.

Parameters
aliasNameThe name of the alias to be removed.
machineWideThe alias was created 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: