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

Need flag to disable setting system PATH variable #211

Open
alexchandel opened this issue Sep 3, 2024 · 5 comments
Open

Need flag to disable setting system PATH variable #211

alexchandel opened this issue Sep 3, 2024 · 5 comments

Comments

@alexchandel
Copy link

The installer currently adds the Strawberry Perl bin folders to the system PATH environment variable. This is normally ok, but I need the ability to customize this. What is the installer flag to disable setting the PATH?

@shawnlaffan
Copy link
Contributor

I'm not sure exactly how to do this, but the WIX installer (version 3) is used to build the MSI files. The relevant files are in https://github.com/StrawberryPerl/Perl-Dist-Strawberry/tree/master/share/msi

You could alternately use the portable versions as these do not add to the global path.

Berrybrew is also a good option. It uses portable versions and includes an option to turn off the current perl. https://github.com/dnmfarrell/berrybrew

And as a general note, removing the Strawberry Perl path components typically needs to be an all or nothing approach. Many of the libraries installed with Strawberry Perl will not run unless they can access the DLLs in the ...\c\bin directory. (There are ways around this but nothing by default).

@alexchandel
Copy link
Author

Agreed that it is all or nothing. The envisioned case here is one where the caller would have the PATH set up to the requirements when calling Strawberry Perl.

This line seems to be where the PATH is appended. Is there a "silent"/"unattended" install flag?

@shawnlaffan
Copy link
Contributor

Is there a "silent"/"unattended" install flag?

Maybe this? https://learn.microsoft.com/en-us/windows/win32/msi/standard-installer-command-line-options#quiet

@alexchandel
Copy link
Author

Yes you are right, the standard msiexec flags work. (They must be supplied in the right order, msiexec /package C:\path\to\thing.msi /passive.) PERL_PATH=Yes could be appended after that for ActiveState MSIs, but still trying to figure out where these flags get created in Wix ...

@shawnlaffan
Copy link
Contributor

The answer is probably the same as in #224 (comment)

https://github.com/StrawberryPerl/Perl-Dist-Strawberry/tree/master/share/msi

I have not worked through these files or the MSI process in any detail, so any findings you can note would be very helpful.

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

No branches or pull requests

2 participants