ShellLinkHelper

class ShellLinkHelper(var link: ShellLink)

Helper class to manipulate ShellLink properties in batches for common tasks ShellLink can be used directly without helper for more detailed set up

Constructors

Link copied to clipboard
constructor(link: ShellLink)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Properties

Link copied to clipboard

Functions

Link copied to clipboard

Serializes ShellLink to specified path. Sets appropriate relative path and working directory if possible and if they are not already set

Link copied to clipboard

Sets target relative to desktop directory of the user opening the link. This method is universal because it works without Registry.CLSID_DESKTOP which is available only on later systems

Link copied to clipboard
fun setLocalTarget(drive: String?, absolutePath: String): ShellLinkHelper
fun setLocalTarget(drive: String?, absolutePath: String, options: ShellLinkHelper.Options): ShellLinkHelper

Sets target on local computer, e.g. "C:\path\to\target"

Link copied to clipboard
Link copied to clipboard

Sets target relative to a special folder defined by a GUID. Use Registry class to get an available GUID by name or predefined constants. Note that you can add your own GUIDs available on your system