Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-run after installation and Auto-run after Windows login #178

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

youngkiu
Copy link

To make the following functions of NSIS available to pynsist, I added the option of run_after_install and run_on_windows_start into the [Application] Section.

https://nsis.sourceforge.io/Run_an_application_shortcut_after_an_install
https://nsis.sourceforge.io/Running_a_.exe_file_on_Windows_Start

Please review the code and apply it.

@takluyver
Copy link
Owner

Thanks for contributing, however...

Run after install: sorry, but no. It's not essential, and it's extra complexity in the installer, which I like to avoid. I've said no to enough things that I wrote a docs page about why I say no and what you can do instead.

Run on start: this is more interesting, but I suspect there's a bit more complexity than the NSIS wiki covers. I know of at least three ways something can be launched on Windows startup: the registry keys you use here, the 'startup' folder in the start menu, and services. What are the pros and cons of each? Do you want to start when the computer boots, or when the user logs in? Does it run as the user? If Pynsist is going to offer an any kind of 'run on start' option, we have to think through these things and figure out if there's an obvious answer that will be right for most applications.

@youngkiu
Copy link
Author

I understand your thoughts.

There are three ways to run on start, as you mentioned

  1. the registry keys
  2. the 'startup' folder in the start menu
  3. services

The way in which each program is considered may be different, and it seems to be confusing.

Since it is a pull request, it is possible to refer to others who need it.
Thank you for your review.

The above function of NSIS have been implemented in pynsist.
…on-is-running-in-nsis-before-uninstalling

The NsProcess plugin function of NSIS have been implemented in pynsist.
@youngkiu
Copy link
Author

I rebase it with the latest code at https://github.com/youngkiu/pynsist/tree/auto-run.

@willbelr
Copy link
Contributor

I would also like an option to place a shortcut into the startup folder upon install. That would be quite handy, and easier for the user to remove if undesired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants