Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 16 21:12
    superbonaci commented #589
  • Oct 16 18:35
    gep13 commented #589
  • Oct 16 17:01
    superbonaci commented #589
  • Oct 16 12:19
    gep13 commented #589
  • Oct 16 09:26
    superbonaci commented #589
  • Oct 16 07:36
    gep13 closed #701
  • Oct 16 07:36
    gep13 commented #701
  • Oct 16 06:44
    gep13 commented #589
  • Oct 13 16:49
    bhargava-raju synchronize #702
  • Oct 13 16:45
    bhargava-raju opened #702
  • Oct 13 08:19
    superbonaci opened #701
  • Oct 13 08:19
    superbonaci commented #589
  • Oct 12 19:01
    bhargava-raju commented #694
  • Oct 10 17:20
    dialex synchronize #700
  • Oct 10 17:19
    dialex opened #700
  • Oct 08 18:59

    gep13 on develop

    (doc) Fix spelling of Chocolate… (compare)

  • Oct 08 18:58
    gep13 commented #699
  • Oct 08 18:58

    gep13 on develop

    Update about.md Merge pull request #699 from Ge… (compare)

  • Oct 08 18:58
    gep13 closed #699
  • Oct 08 18:42
    Gensis64 reopened #699
Hitesh
@TechMinder
@ferventcoder yep! that's the issue. I don't know why it won't create environment variable even if I run the batch as administrator. Do you think it's not right approach to install chocolatey?
@ferventcoder I forgot to mention, the batch file is on shared location.
Rob Reynolds
@ferventcoder
install choco as an admin
that's fine
the problem is likely elsewhere
If you see this only happen on a handful of systems
it's explorer.exe not recognizing the updated values
Hitesh
@TechMinder
it's happening on every machine where I am installing using batch file.
Rob Reynolds
@ferventcoder
you can try this from cmd.exe to trigger it: setx trigger 1, then close and reopen everything
take a look at how choco handles updating environment variables for clues to what may be going on - https://github.com/chocolatey/choco/blob/2f588e755e33e4476f5170494c097932a23e1554/src/chocolatey.resources/helpers/functions/Set-EnvironmentVariable.ps1
Hitesh
@TechMinder
@ferventcoder thanks Rob, let me try this.
Rob Reynolds
@ferventcoder
you can try killing and restarting explorer.exe (it's a bit hacktastic as compared to a reboot, but... (shrugs))
that will ensure all environment settings and changes get loaded
start with setx
Hitesh
@TechMinder
Thanks Rob, I will try the options you provided.
thanks for your help. I will let you know if it gets solved..
Rob Reynolds
@ferventcoder
Also, follow this -chocolatey/choco#1297
Hitesh
@TechMinder
@ferventcoder as per your suggestion, I am setting up envionrment variable ChocolateyInstall through command after installing Chocolatey as an admin. It works now.
Rob Reynolds
@ferventcoder
@TechMinder you should not need to, it will add it
if it doesn't, that is a bug
but I did ask you to verify that it was added to the registry already
Because many times Windows does weird stuff
it's helpful to know if it is something local acting weird or not
Hitesh
@TechMinder
@ferventcoder I didn't found any entry in the registry. I tried same approach on at least three different machines, and I got same error on each. I restarted computer and still no changes to environment variable.
Rob Reynolds
@ferventcoder
How are you installing choco?
@TechMinder ^^
Hitesh
@TechMinder
@ferventcoder running batch file as an admin

@ferventcoder ```
CD %UserProfile%\My Documents

SET chocoDir=choco
IF not exist %chocoDir% (mkdir %chocoDir%)

CD %chocoDir%

COPY "\<network path>\choco\choco.exe"

choco.exe install Chocolatey

setx ChocolateyInstall "%UserProfile%\My Documents\choco"

start CMD /k "\<network path>\choco\installgui.bat"```

this is the script.
Rob Reynolds
@ferventcoder
So that explains the issue :+1:
https://chocolatey.org/install - click on more options and see offline script
Rob Reynolds
@ferventcoder
@TechMinder ^^
Hitesh
@TechMinder
@ferventcoder thanks for pointing to me right material. I am still trying to understand the issue. My understanding is Choco.exe is standalone executable so it should not matter how the install Chocolatey command is called. Please correct me if I am wrong. The issue with my script is powershell executionpolicy, is that correct?
I am talking about without downloading chocolatey nupkg file.
Richard Simpson
@RichiCoder1
@TechMinder Choco.exe is not standalone. Or at least not completely. It initializes a fair amount of context and settings that must be present for it to work properly.
If you poke inside the nupkg (It's just a zip), you'll notice there's install scripts and tools and helpers and more.
Hitesh
@TechMinder
Thanks @RichiCoder1 , now I got the answer. I will follow the steps defined on the page.
Richard Simpson
@RichiCoder1
:+1: Good luck! If you have anymore questions, feel free to ask (though preferably in chocolatey/choco ;P)
Hitesh
@TechMinder
okay, my goal was to run ChocolateyGUI . so I posted all the questions here. :smile:
Richard Simpson
@RichiCoder1
Absolutely, if you run into Gui specific issues post here.
Hitesh
@TechMinder
Thanks @ferventcoder @RichiCoder1 for help and answering questions.
@RichiCoder1 do we have plan to make choco standalone? It worked for me with extra command to setup environment variable.
Richard Simpson
@RichiCoder1
@TechMinder That's a @ferventcoder question. My understanding is no, but that could change.
Rob Reynolds
@ferventcoder
@TechMinder choco is not required to be downloaded, but you do need the chocolateyInstall.ps1 (and other PowerShell scripts in the package) to get it installed properly
@TechMinder if you do it outside of that as standalone (it could work), but we won't consider that a supported scenario. So when new things would be added, you would be broken and that would be in your purview to find and fix. We prefer you do things in a supported manner. HTH
Hitesh
@TechMinder
@ferventcoder I see choco in nupkg. Anyways, thanks for your help. I have already replaced my script with recommended one.
Hitesh
@TechMinder
@ferventcoder just ignore my last question. I got the answer. I must have this package to get choco. then I can run command.
Rob Reynolds
@ferventcoder
perfect. Was just providing insight for both you and anyone that happens across the convo. :D
EntranceJew
@EntranceJew
latest version from chocolatey (0.13.2) gives me this crash on startup while getting package list https://hastebin.com/isufeximoz.css
Richard Simpson
@RichiCoder1
@EntranceJew I'll echo the comments in the other thread. Try pre-release :)