public override void CreateShortcut(CreateShortcut action)
            {
                string shortcutFileName = Runner.InvokeExpression<string>(
                    action.ShortcutFileName
                );

                AddToInstallLog(new InstallLogCreateFile
                {
                    Path = shortcutFileName
                });

                _form.RaiseProgressChanged(String.Format(UILabels.CreatingShortcut, shortcutFileName));

                var shellLink = new ShellLink
                {
                    Target = Runner.InvokeExpression<string>(action.TargetFileName),
                };

                if (action.IconFileName != null)
                    shellLink.IconPath = Runner.InvokeExpression<string>(action.IconFileName);

                if (action.IconIndex != null)
                    shellLink.IconIndex = Runner.InvokeExpression<int>(action.IconIndex);

                if (action.StartOptions != null)
                    shellLink.Arguments = Runner.InvokeExpression<string>(action.StartOptions);

                if (action.Description != null)
                    shellLink.Description = Runner.ParseTemplate(action.Description);

                Directory.CreateDirectory(Path.GetDirectoryName(shortcutFileName));

                shellLink.Save(shortcutFileName);
            }
 public abstract override void CreateShortcut(CreateShortcut action);
 public abstract override void CreateShortcut(CreateShortcut action);
Exemple #4
0
 public virtual void CreateShortcut(CreateShortcut action)
 {
 }
 public virtual void CreateShortcut(CreateShortcut action)
 {
 }