C# Class WixSharp.AutoElements

Automatically insert elements required for satisfy odd MSI restrictions.

- You must set KeyPath you install in the user profile.

- You must use a registry key under HKCU as component's KeyPath, not a file.

- The Component element cannot have multiple key path set.

- The project must have at least one directory element.

- All directories installed in the user profile must have corresponding RemoveDirectory elements.

...

The MSI always wants registry keys as the key paths for per-user components. It has to do with the way profiles work with advertised content in enterprise deployments. The fact that you do not want to install any registry doesn't matter. MSI is the boss.

The following link is a good example of the technique: http://stackoverflow.com/questions/16119708/component-testcomp-installs-to-user-profile-it-must-use-a-registry-key-under-hk

ファイルを表示 Open project: Eun/WixSharp Class Usage Examples

Public Properties

Property Type Description
DisableAutoCreateFolder bool
DisableAutoKeyPath bool
DisableAutoUserProfileRegistry bool

Private Methods

Method Description
ClearKeyPath ( this element ) : System.Xml.Linq.XElement
ContainsAdvertisedShortcuts ( this xComp ) : bool
ContainsAnyRemoveFolder ( this xDir ) : bool
ContainsComponents ( this xDir ) : bool
ContainsDummyUserProfileRegistry ( this xComponent ) : bool
ContainsFiles ( this xComp ) : bool
ContainsNonAdvertisedShortcuts ( this xComp ) : bool
CrteateComponentFor ( this doc, System.Xml.Linq.XElement xDir ) : System.Xml.Linq.XElement
DefaultExpandCustomAttribute ( System.Xml.Linq.XElement source, string item ) : bool
ExpandCustomAttributes ( System.Xml.Linq.XDocument doc ) : void
GetUserProfileFolders ( ) : string[]
HasKeyPathElements ( this xComponent ) : bool
HasKeyPathSet ( this element ) : bool
InUserProfile ( this xDir ) : bool
InjectAutoElementsHandler ( System.Xml.Linq.XDocument doc ) : void
InjectPlatformAttributes ( System.Xml.Linq.XDocument doc ) : void
InjectShortcutIcons ( System.Xml.Linq.XDocument doc ) : void
InsertCreateFolder ( System.Xml.Linq.XElement xComponent ) : void
InsertDummyUserProfileRegistry ( System.Xml.Linq.XElement xComponent ) : void
InsertRemoveFolder ( System.Xml.Linq.XElement xDir, System.Xml.Linq.XElement xComponent, string when = "uninstall" ) : void
InsertUserProfileRegValue ( this xComponent ) : System.Xml.Linq.XElement
InsertUserProfileRemoveFolder ( this xComponent ) : System.Xml.Linq.XElement
IsUserProfileRoot ( this xDir ) : bool
NormalizeFilePaths ( System.Xml.Linq.XDocument doc, string sourceBaseDir, bool emitRelativePaths ) : void
SetFileKeyPath ( System.Xml.Linq.XElement element, bool isKeyPath = true ) : void

Property Details

DisableAutoCreateFolder public_oe static_oe property

The disable automatic insertion of CreateFolder element. Required for: NativeBootstrapper, EmbeddedMultipleActions, EmptyDirectories, InstallDir, Properties, ReleaseFolder, Shortcuts and WildCardFiles samples.

Can also be managed by disabling ICE validation via Light.exe command line arguments.

This flag is a heavier alternative of DisableAutoKeyPath. See: http://stackoverflow.com/questions/10358989/wix-using-keypath-on-components-directories-files-registry-etc-etc for some background info.

public static bool DisableAutoCreateFolder
return bool

DisableAutoKeyPath public_oe static_oe property

The disable automatic insertion of KeyPath=yes attribute for the Component element. Required for: NativeBootstrapper, EmbeddedMultipleActions, EmptyDirectories, InstallDir, Properties, ReleaseFolder, Shortcuts and WildCardFiles samples.

Can also be managed by disabling ICE validation via Light.exe command line arguments.

This flag is a lighter alternative of DisableAutoCreateFolder. See: http://stackoverflow.com/questions/10358989/wix-using-keypath-on-components-directories-files-registry-etc-etc for some background info.

public static bool DisableAutoKeyPath
return bool

DisableAutoUserProfileRegistry public_oe static_oe property

Disables automatic insertion of user profile registry elements. Required for: AllInOne, ConditionalInstallation, CustomAttributes, ReleaseFolder, Shortcuts, Shortcuts (advertised), Shortcuts-2, WildCardFiles samples.

Can also be managed by disabling ICE validation via Light.exe command line arguments.

public static bool DisableAutoUserProfileRegistry
return bool