## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
• Create your own community
##### Activity
• Sep 13 06:49
lucknaumann commented #685
• Sep 13 06:09
gep13 commented #685
• Sep 12 23:48
lucknaumann commented #685
• Sep 12 11:28
• Sep 11 01:43
lucknaumann commented #685
• Sep 11 01:43
lucknaumann commented #685
• Sep 10 07:01
punker76 commented #685
• Sep 10 06:58
punker76 assigned #685
• Sep 10 02:59
lucknaumann commented #685
• Sep 10 02:39
lucknaumann commented #685
• Sep 01 15:46
gep13 closed #696
• Sep 01 15:46
gep13 labeled #696
• Sep 01 15:21
• Sep 01 14:35
superbonaci opened #696
• Aug 27 09:39
mwallner labeled #694
• Aug 27 09:39
mwallner labeled #694
• Aug 23 14:51
gep13 labeled #695
• Aug 23 14:51
gep13 milestoned #695
• Aug 23 14:51
gep13 assigned #695
• Aug 23 14:51
gep13 opened #695
Rob Reynolds
@ferventcoder
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
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?
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 :)
Details how are on the github page readme.
EntranceJew
@EntranceJew
that one launches no problem :thumbsup:
Richard Simpson
@RichiCoder1
Glad to hear :). Let us know if you run into any further issues!