-
Notifications
You must be signed in to change notification settings - Fork 369
Chocolatey installation for multiple users #903
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
Conversation
Fix for issue #874. Switched the installation script to use automatic Chocolatey facilities for installing command-line tools. Chocolatey handles putting in a shim to scriptcs.exe and adding the path info. No need for uninstall when using this mechanism - Chocolatey does it all for you.
|
Testing this is sort of painful and manual, but here's how:
|
|
@tillig thanks very much for this! I really like it, especially the hugely simplified install script! The use of built in chocolatey idioms is a way nicer way to go. I guess the only downside to this is that it will now require admin rights to install scriptcs. @scriptcs/core how much does this bother us? |
|
Thank you very much! 👍 |
|
Generally packages installed by Chocolatey do seem to require admin rights. It's totally up to y'all, but there's at least precedent for that. (Technically, for me, at least, even installing scriptcs in its current incarnation required admin rights because once you install a package using admin rights, the admin user takes ownership of the chocolatey.log and further non-admin installs become impossible.) Anyway, if this looks like it'll work and folks are amenable, it'd be pretty helpful for those of us switching between admin and non-admin accounts. |
|
I get dirty messages from Chocolatey if I don't install things as my other user account with admin privileges. Sometimes, those messages seem accurate. |
|
Nice! I am not too concerned on the admin requirement for chocolatey as it
|
|
@glennblock great - in that case I think we should go ahead and accept this. @tillig one question first:- how does it behave if an older per-user installation is already present? |
|
Just tested it out and apparently upgrading a package does not actually run the uninstall for the previous version so the way I have it now you'd have to manually uninstall and then reinstall. Let me see if I can make it just a touch smarter so the upgrade scenario works. |
Added a routine to deal with removing the per-user install of scriptcs and per-user PATH setting on upgrade.
|
I added a block of code that will remove the old %AppData% based install locations and per-user path settings during an upgrade scenario. This allows existing users to upgrade to the new mechanism and new users to install. It's unfortunate, but there's no Uninstall-ChocolateyPath in Chocolatey so we can't just use a one-liner to remove the path like was used to install it. Thus you'll see a little bit of manual parsing, but there's really no other way. It's the reverse logic of what's in |
Chocolatey installation for multiple users
|
Thanks @tillig! 👍 |
|
Added you to the contributors list: https://github.com/scriptcs/scriptcs/wiki/Contributors 😄 |
|
BTW, @scriptcs/owners @scriptcs/core: we should really automate that list. Maybe I should add a list as part of the new community blog? Like http://nancyfx.org/contribs.html? |
|
@khellang We could host it on the blog and link to it. On Mon Jan 19 2015 at 10:10:33 PM Kristian Hellang notifications@github.com
|
|
It's actually already automated at https://github.com/scriptcs/scriptcs/graphs/contributors It does require that people commit with their correct email addresses though. |
|
Happy to help! |
|
Damn, I've been struggling to get on that wiki list for years ... what does a man have to do? |
|
😱 you weren't on it!? Fixed 😃 |
|
It's a wiki, it's publicly editable :-)
|
|
Are you saying that I could have just added myself a long time ago and didn't have to learn to write any code at all. Man, that's several years down the drain. |
|
Look ma .. on top of the list (sorry for hijacking this thread for such silliness) |
|
@khellang I like your idea of automating the list in a similar way to Nancy and I think you should go for it. It will be a repitition of https://github.com/scriptcs/scriptcs/graphs/contributors but in a nicer looking and more prominent way. |
Fix for issue #874. Switched the installation script to use automatic Chocolatey facilities for installing command-line tools. Chocolatey handles putting in a shim to scriptcs.exe and adding the path info. No need for uninstall when using this mechanism - Chocolatey does it all for you.