public static InstallationBuilder WithCopyFilesToDestination(this InstallationBuilder source, string destinationFolder, string sourceFolder, bool copySubfolders, string filter) { sourceFolder = sourceFolder ?? source.Result.SourceFolder; return(source.WithElement( new FolderInstallerElement( string.Format("Copy files from {0} to {1} folder", sourceFolder, destinationFolder), sourceFolder, destinationFolder, copySubfolders, filter))); }
public static InstallationBuilder WithContextFolderMenuItem(this InstallationBuilder installationBuilder, string destination, string contextMenuText, string executionPath = null) { var rootPath = RegistryPath.ContextFolderMenuPath(destination); var commandPath = rootPath.CombinePathWith("command"); executionPath = executionPath ?? (installationBuilder.FullPrimaryExecutionPath + " \"%L%\""); return(installationBuilder .WithRegistryElement(RegistryRoot.HKEY_Classes_Root, rootPath, null, new[] { new RegistryValue("MUIVerb", contextMenuText) }) .WithRegistryElement(RegistryRoot.HKEY_Classes_Root, commandPath, null, new[] { new RegistryValue("", executionPath), })); }
public static InstallationBuilder WithRegistryElement(this InstallationBuilder installationBuilder, RegistryRoot root, string path, string name, RegistryValue[] values) { return(installationBuilder.WithElement(new RegistryInstallerElement(root, path, name, values))); }
public static InstallationBuilder WithCopyToProgramsFiles(this InstallationBuilder source, string pathInProgramFiles, string sourceFolder = null, bool copySubfolders = true, string filter = null) { return(WithCopyFilesToDestination(source, Folder.ProgramFilesFolder.CombinePathWith(pathInProgramFiles), sourceFolder, copySubfolders, filter)); }
public static InstallationBuilder WithShortcutElement(this InstallationBuilder installationBuilder, string destinationFolder, string linkName, string sourcePath = null) { sourcePath = sourcePath ?? installationBuilder.FullPrimaryExecutionPath; return(installationBuilder.WithElement(new CreateShortcutElement(sourcePath, destinationFolder, linkName))); }