Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
AnshMishra2001
@AnshMishra2001
But not sure what went wrong.
JervisLam
@jervislam0911
Hi everyone, we have packaged our application using chocolatey and it has been working fine for us. but recently we're seeing message like "ShimGen has successfully created a shim for jaccessinspector.exe".. and then it failed with the non-zone return code... but looks like the packages already installed. just wondering if anyone had such issue before?
1 reply
Scott Kessman
@skessmanGoGGI_gitlab
Good Morning. I am a Noob, but learning....is there a way to use Chocolatey Gui with a Repository that uses login and not anonymous?
TheCakeIsNaOH
@TheCakeIsNaOH
@skessmanGoGGI_gitlab It is possible to use Chocolatey Gui with password-protected sources.
One option is to use the choco source add command to add the repository, using --user and --password arguments to specify the login; then Chocolatey Gui will pick up that source because it uses the same config that choco.exe uses. The other option is to go into the Chocolatey GUI settings, go over to the sources tab, and set the username and password for the repository source that needs it.
SalixViridian
@SalixViridian
Hi I believe my site might have been blocked because I was setting up a number of machines at once. How can I remedy this?
SalixViridian
@SalixViridian
Looks like temp ban goes away after an hour. I had no idea that was a thing, but it makes sense. Thanks.
Manuel Riezebosch
@riezebosch
For docker-desktop we're facing the problem that the program auto-updates itself which seem to break subsequent updates on the choco package. My idea is to check in the install & uninstall script for the actual installed version and skip further processing when it already matches for the install and skip when it doesn't match for the uninstall. Is this a normal thing to do?
2 replies
Xavier Plantefève
@XPlantefeve
Hello. I maintain a small package for a soft that sees several years between releases, so I have to relearn things every time. I'm trying to push a new version, and it's -I think- the first time I have to do it through choco push rather than the website. However, even after setting up my API key, I still have a 403 while pushing (the full error message is simply "forbidden"). My IP is not listed at projecthoneypot, I'm a single user who don't use Chocolatey often enough to have any sort of temporary ban. Is that a known problem for packages that have only been updated through the web site, am I out of luck ?
TheCakeIsNaOH
@TheCakeIsNaOH
@XPlantefeve I am not aware of any issue like that. Can you go to the package for the package (https://chocolatey.org/packages/<packageName>) and double-check that you are still a maintainer of the package?
Xavier Plantefève
@XPlantefeve
@TheCakeIsNaOH I am still the maintainer (says so both on the package page and on my profile). And the source I'm trying to use as a parameter for choco push hasn't changed either.
TheCakeIsNaOH
@TheCakeIsNaOH
You are using https://push.chocolatey.org/ as the push source correct?
Xavier Plantefève
@XPlantefeve
Errr, no. I'm using a repo on github. Isn't the source parameter used to point to the package source code location ?
TheCakeIsNaOH
@TheCakeIsNaOH
No, it points to where you want to push the package too.
Xavier Plantefève
@XPlantefeve
Ooooh
TheCakeIsNaOH
@TheCakeIsNaOH
Its name is a holdover from installing packages, where the source is the place you want to install from. So you push the package source that you want to have the package available at.
Xavier Plantefève
@XPlantefeve
Ok, I just did, successfully so. My bad then, I was dumb. Thanks a lot for your help!
Paul Broadwith
@pauby
@TheCakeIsNaOH++
The chocolatiest bot this side of the Mississippi
@choco-bot
thecakeisnaoh +1! (Karma: 4)
Erik Thomsen
@etho201
Hi everyone
I've got a question, and maybe I should direct this to the Ansible team, but here goes. I use Ansible to install chocolatey packages on a remote host -- it works fine. I've created my own chocolatey packages as well. All 3 work when I run them locally with choco install PACKAGES -s .. 2 out of the 3 work fine when invoked using the win_chocolatey module as well. But one is not working.
The only difference in the one that isn't working is that it requires an AutoHotKey (AHK) script to handle the install. Again, it works fine when I invoke it locally, but doesn't seem to work when invoked with Ansible.
Kim J. Nordmo
@AdmiringWorm
@etho201 I assume the package that do not work also have a dependency on autohotkey?
Erik Thomsen
@etho201
I checked the logs and it gets stuck at:
2021-01-24 23:05:05,944 6084 [INFO ] - Installing orthocad...
2021-01-24 23:05:05,990 6084 [DEBUG] - Running Start-ChocolateyProcessAsAdmin -validExitCodes '0' -workingDirectory 'C:\tmp\chocolatey\orthocad\1.0' -statements ' ' -exeToRun 'C:\tmp\chocolatey\orthocad\1.0\iTero_Online_Setup_5.9.1.20.exe' 
2021-01-24 23:05:05,990 6084 [DEBUG] - Unable to use current location for Working Directory. Using Cache Location instead.
2021-01-24 23:05:06,005 6084 [DEBUG] - Test-ProcessAdminRights: returning True
2021-01-24 23:05:06,020 6084 [DEBUG] - Elevating permissions and running ["C:\tmp\chocolatey\orthocad\1.0\iTero_Online_Setup_5.9.1.20.exe"  ]. This may take a while, depending on the statements.
It does have a dependency on Autohotkey, in which i have autohotkey.portable installed via chocolatey
Kim J. Nordmo
@AdmiringWorm
nvm, issue seems different. could be a problem with your autohotkey script, that prevents it from running correctly when installed through ansible.
seen that happen a few times on automated ci systems, usually the cause from what I have seen is that you can not use any mouse click handlers in the autohotkey script
Erik Thomsen
@etho201
Maybe that's it, but I since it gets stuck on "Elevating permissions and running . . . this may take a while" -- it never does anything after that. I have verified that it launches the AHK process.
This particular installer should pop up on the screen but it never does when invoked with Ansible
The installer for the exe itself that is (not AHK)
I will try to remove the AHK script and see if it will at least launch the installer
Kim J. Nordmo
@AdmiringWorm
hmm, sounds like a problem with the launch procedure when used trough ansible then, and not the autohotkey script.
I am afraid that I have very limited experience with ansible, so if the problem only occurs during the install through ansible I am not able to help in that case.
There are other people in the community with experience of ansible that can be of help, but I believe there will still be a few hours before they come on...
Erik Thomsen
@etho201
Gotcha! Thank you Kim! It's not really a rush, but I would love to understand what's going on. I removed the invocation of the AutoHotKey script and tried it again with this particular package and it's still not getting passed that last step, Elevating permissions and running. So that at least rules out AHK. Not yet sure why it can't move any further. Other packages install and work just fine with Ansible/chocolatey...
Testing is done on a vagrant instance of Windows 10. Only one user vagrant and they are in the administrators group
Kim J. Nordmo
@AdmiringWorm
The line regarding Elevating permissions and running... is always the last line before the actual launch of the executable, there will never be any additional log output in that file until the executable closes and returns the handle to chocolatey.
So by that, I can say for sure that the executable gets launched, but why it never shows anything or returns is a mystery
Erik Thomsen
@etho201
Good to know. I looked in the Windows Event Viewer but didn't notice any further clues there...
So there must be some slight difference with out the win_chocolatey module executes the script.. or something with WinRM... maybe I can try it through OpenSSH instead.
I'll check back later and see if anyone has some ideas. Thank you for your help @AdmiringWorm !
Kim J. Nordmo
@AdmiringWorm

So there must be some slight difference with out the win_chocolatey module executes the script.. or something with WinRM... maybe I can try it through OpenSSH instead.

WinRM could definitely be the problem, I have heard in the past that it had caused issues with certain packages (especially for autohotkey packages, and packages installing services).
Not sure what the exact problem was though, nor if there ever was a solution for it. Testing using ssl could be something worthwhile for you to test in this case, but not sure if that would really solve the issue. But there is a possibility

Erik Thomsen
@etho201
Thank you very much for the input. I'll see if there are any differences using OpenSSH instead
Erik Thomsen
@etho201
Unfortunately, it appears to behave the same with OpenSSH :hmm:
TheCakeIsNaOH
@TheCakeIsNaOH
I suspect that it does not work is because it is running headlessly, so therefore the setup exe just waits endlessly for the non-existent window to be clicked.
Erik Thomsen
@etho201

@TheCakeIsNaOH -- you got me thinking, and I suspect it has to do with this statement on the win_chocolatey module:

Some packages, like hotfixes or updates need an interactive user logon in order to install. You can use become to achieve this.

Erik Thomsen
@etho201

I've tried it with

- name: Install Orthodontic apps
  win_chocolatey:
    name: orthocad
    source: C:\coretechonomy\chocolatey\
  become: yes
  become_user: vagrant
  become_flags: logon_type=interactive logon_flags=with_profile
  # https://docs.ansible.com/ansible/latest/user_guide/become.html

No luck yet though :(

image.png
The processes are running in the background in a different session so it's not working... maybe if I could ensure the autohotkey process runs in the same session but I'm not sure how to check that..
Paul Broadwith
@pauby

@etho201 You won't be able to install a package using Ansible with Autohotkey. Autohotkey requires an interactive session which you won't get whether you run become or not (become really just allows you to either elevate your session or become another user). This isn't a failure of Chocolatey or Ansible. It's just the way that Ansible works. And Puppet. And PowerShell DSC. And Chef. Packages that require Autohotkey are just not going to work running headlessly (as @thecakeisnaoh said above).

Having said that, you might want to look at win_psexec (Ansible docs). I haven't used it for this specific scenario, so it may still not work, and you will likely need to have a logged on user for it to work (as it interacts with a user session). You will also have to grab the user session ID to use that session (I can share the code I have for this if this is an option for you). What I will say is I have a playbook that builds my desktop from scratch and some software requires to be run interactively (not using it for Chocolatey installs or Autohotkey though) and this is the way I found to get it to work.