Closed gsemet closed 5 years ago
It looks like the code to do this in _system_path.py has parameters allusers=True
to modify PATH for the user or the whole system, but it's always used in system mode. Do you want to make a pull request? To keep the command-line parsing simple, I'd just split the add
option to something like add-system
and add-user
.
And this would be exposed in the configuration file? Not sure to see how you want to handle this?
The installers created can already do a per-user install if the user chooses (or if they don't have admin access). It would have to choose the script's behaviour based on that. So it doesn't know until the installer is run.
Here's an example of how to check in the installer which mode it's being run in:
is there a feature to ask the user if he wishes an single user install or or multi user (ex: like python installer, where the multi user checkbox is grayed if the installer is not run as an super-super)?
Yes, if the user has permission to install for all users, they should see a page in the installer asking whether they want to do that. Pynsist uses the MultiUser.nsh header file, documented here:
Can you test pull request #170? I've left notes there on how to test it.
Thanks for your PR. I didn't has time to test it. I will try to do it !
Thanks! The PR is merged and released now (as Pynsist 2.3), so it should be easy to test.
Hi.
I have a cli that I would like to add to the PATH in PyNSIST (using
console=True
), but it cannot do it in the installation process. It kind of fail setting the PATH in the registry key, and simply ignore the error. It is possible to modify the PATH manually afterward, but would be cool if the installer, when run in user mode (non-admin), would patch the user's PATH instead of the system's PATH.Thx!