Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Rob Reynolds
@ferventcoder
It's likely
We are looking at sone options over the next few weeks
n3rd4i
@n3rd4i
Hi, I want to change the content of an *.ini in-place. Sure in powershell this is possible with extensions like: PsIni but maybe there a build in cleaner way ? The big idea is to have something like sed -i will be the general case. This will be done a in a package installation. Any suggestions on this?
Rob Reynolds
@ferventcoder
There are options but you will end up with folks questioning why there are dependencies on other packages (sed or related in this case). I'd recommend sticking with PowerShell until you have no other choice. We see this a lot with AutoHotKey being needed for bad installations - the question of why it's required and not wanting to install a package with dependencies on things that are really just dependencies of managing the installation/uninstallation
n3rd4i
@n3rd4i
I can detail, the package in question will install with default configuration from the original SW. This default/original configuration seems invalid. The detail is in the *.ini config file for the SW (in this case is a MOD for a game). Using sed -i will allow the package to fix *.ini from default to working. This means the user does not need to do that manually since he/she will be more interested of using the mod than spending time on configuration. contents of RA2MO.ini e.g.:
-Renderer=Default
+Renderer=TS_DDRAW_2
n3rd4i
@n3rd4i
Actually PowerShell supports this with small tweak, this can be included inside the package install file:
(Get-Content "$iniFile") -replace 'Renderer=Default', 'Renderer=TS_DDRAW_2' | Set-Content "$iniFile"
Ringtailed Fox
@RingtailedFox_gitlab
greetings, everyone! i come from the chocolatey irc room on freenode.... i was hoping to find some assistance and advice on chocolatey and its packages
i have gimp, cmake, winscp and putty already installed on my machine.. is there a way to have chocolatey manage them for update purposes, or do i have to uninstall, then re-install them with chocolatey?
also, how do i force Emacs to install to C:\Program Files\Emacs and NirLauncher to C:\NirLauncher? NirLauncher wants to go into C:\TOOLS\, which i don't want, while Emacs wants to go into the chocolatey bin folder in C:\ProgramData\Chocolatey\Bin...
Rob Reynolds
@ferventcoder
If you install a newer version through a Chocolatey package, it will simply upgrade the underlying software and choco will take over @RingtailedFox_gitlab
Ringtailed Fox
@RingtailedFox_gitlab
oh nice!
Rob Reynolds
@ferventcoder
Emacs might be a portable type that is extracting a zip, so to go to program files you might be looking for the emacs installer package (if one exists)
Ringtailed Fox
@RingtailedFox_gitlab
i see
Rob Reynolds
@ferventcoder
NirLauncher likely details package params that may have an install directory - the c:\tools is using an environment variable called ChocolateyToolsLocation (IIRC)
@n3rd4i the powershell method looks fine 😀
Ringtailed Fox
@RingtailedFox_gitlab
i wonder if there's a way for chocolatey to find stuff already-installed on my computer like LibreOffice... so it doesn't have to download the often huge-sized installers...
like... i know the LibreOffice one's a few hundred MB and takes a few minutes to install, even on my SSD :P
Muhammad Hussein Ammari
@xmha97
Some packages are out of date.
How can I update them?
image.png
Kim J. Nordmo
@AdmiringWorm
@xmha97 you can't update a package that you do not maintain.
To get a package updated that is maintained by another user, use the Contact Maintainers link on the package page and ask them to update the package.
Manfred Wallner
@mwallner
is there a pattern / example on how to handle specific exit codes in a Chocolatey package?
i.e. if vs_professional.exe upgrade --noweb --noupdateinstaller fails with exit code '1', I want to "retry" without the -noupdateinstaller argument.
is there a way to (cleanly) get the exit code of a `Install-ChocolateyInstallPackage ?
Andrea
@icyz
Hello, there is a way to avoid download a package if it's already downloaded (maybe if it's in cache) ? (free version)
Rob Reynolds
@ferventcoder
Package or software?
Andrea
@icyz
sorry, software
Rob Reynolds
@ferventcoder
If it was downloaded to the cache and meets checksum/content length checks, it may use the one in cache - no guarantee though and I would not use that cross machine - folks have seen locking issues, etc based on software installer behavior (not choco)
Andrea
@icyz
I've already tried, but seems it not use the one in cache
Muhammad Hussein Ammari
@xmha97

@xmha97 you can't update a package that you do not maintain.
To get a package updated that is maintained by another user, use the Contact Maintainers link on the package page and ask them to update the package.

OK, Thanks.

Shai Gluskin
@shaigluskin
I'm a new choco user. I'm having a lot of success. I'm a Linux enthusiast who must use Windows at work. Choco is such a pleasure. My problem: using choco I have installed WSL (version 1.0.1) and wsl-ubuntu-1804. No errors. Ubuntu, however, does not seem to be registering as an application. Cortana search can't find it, the Start menu can't find it. I can run an Ubuntu shell inside PowerShell with the command "wsl" which gives Ubuntu's root@mycomputer prompt. But I want to run Ubuntu as a Windows app, not only inside PowerShell. Thx.
Joel Sallow (/u/ta11ow)
@vexx32
@shaigluskin run Get-Command wsl | % Source to find where it's pulling from so you can add shortcuts or whatever else you need to make accessing it easier :)
procdaddy11
@procdaddy11
Is there a way to mass append the -noshortcut switch to all apps?
Shai Gluskin
@shaigluskin
@vexx32 Thanks. Finding the source of wsl wasn't helpful. Double clicking on the wsl.exe or making a shortcut to it opened up ubuntu root in the PowerShell. I didn't have time to continue troubleshooting to make the install all chocolatey. wsl is installed by choco but I got the ubuntu distro by doing the following in PowerShell
curl.exe -L -o ubuntu-1804.appx https://aka.ms/wsl-ubuntu-1804
Add-AppxPackage .\ubuntu-1804.appx
Joel Sallow (/u/ta11ow)
@vexx32
from memory WSL has been primarily command line based...
I don't remember if there's a way for WSL to hook into an Ubuntu desktop or something
they recently demo'd WSL2 being able to open Linux Gui applications
but I'm not sure if that's publicly available yet
Shai Gluskin
@shaigluskin
Hi Joel @vexx32, WSL 2 is not official yet; but I'll likely stick with WSL 1 because I use VirtualBox in some contexts and you can't run VirtualBox and WSL 2 at the same time.
I wasn't trying to get Ubuntu GUI applications. The Ubuntu shell is supposed to be able to run as a Windows application. Here is a screen shot.
Shai Gluskin
@shaigluskin
@vexx32 Ubuntu shell running as app in Windows 10
@vexx32 This is a screenshot of the first run; it asks you to create a user. And note the Ubuntu icon in the taskbar. When I had installed Ubuntu via choco and then ran wsl in PowerShell, there was no "installing" nor was I asked to create a "default Unix user account." I was just root in the PowerShell.
I'm glad that choco has installed wsl. But when I think about it; there isn't a real need to have Ubuntu distribution installed via choco because I'll be able to update Ubuntu inside the Ubuntu shell itself with sudo apt commands.
Paul Broadwith
@pauby
@procdaddy11 That's not a valid Chocolatey parameter. If you are looking to have packages not create shortcuts for software they install, see chocolatey/choco#764 and chocolatey/choco#344
Shai Gluskin
@shaigluskin
I was trying to install the new-ish Windows Terminal application with choco; it failed with "your Windows version isn't new enough". Okay. But it then it listed a bunch of dependencies which did get installed. Should I remove those no-longer-needed dependencies? I started to do that with choco uninstall but Win 10 crashed after an uninstall command. Thoughts?
Miguel Pérez García
@miker1423
Hello! I have a couple questions about configuring a windows server to allow for package installation on some client machines, I work at a small office as a developer, and we used to not have any restriction on software installation and all the local users were administrator to their own machines, so anyone with chocolatey could install any software from our own internal feed, but now the IT people had all PC's joined into a domain and the policy is that no one has administrative access (which is good) but none of us can install software through chocolatey, can we add a rule to the groupo policies to allow chocolatey to install software or which would be the correct path? Thanks!
matrixbot
@matrixbot
dittid Hello, I'm a newbie of chocolatey and I don't get how am I supposed to edit a package it it's outdated. Is there a Github repo I can fork? How does it work for the community packages?
MatthDuc
@Vagrantin
@matrixbot , a good start would be to go to "https://chocolatey.org/packages" and lookup for this oudated package.
You will find lots of technicall details about this package, you can post some comments there to get in touch with the maintainer and also a link how to contact maintainers.
You can also do a choco info mypackage in cli
Happy reading !
matrixbot
@matrixbot
dittid MatthDuc (Gitter) thx 😉
Roman Valls Guimera
@brainstorm

In my experience RefreshEnv.cmd does not reload the PATH variables in PowerShell. Is that correct? I still include this in my Boxstarter scripts to continue provisioning: $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")

I'm actually having issues with Choco and TravisCI precisely on this front: https://travis-ci.org/github/brainstorm/opencv/jobs/693263876#L9544

Any suggestion to make this work right under git-bash shell on TravisCI would be super appreciated: https://github.com/brainstorm/opencv/blob/rpi3_arm64/ci/build.sh#L39

Paul Broadwith
@pauby
@shaigluskin The only dependency for the windows-terminal package is vcredist140. As this is a dependency on a lot of packages, I'd leave it installed.
@milker143 Windows needs admin rights to install the vast majority of software so this isn't a Chocolatey limitation. Chocolatey For Business comes with the Background Agent that allows you to install software with administrative rights.