PowerShell PackageManagement (OneGet) - Install Apps from Command Line  

Page 11 of 14 FirstFirst ... 910111213 ... LastLast

  1. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #100

    Kari, I was working through this today and ran into 1 problem which was easy to fix.
    Step 3.2 says
    Notice that adding Chocolatey, the provider NuGet will also be added.
    This did not happen for me. I had to add NuGet separately.

    I opted to install ChocolateyGUI as a test and it installed fine but doesn't work at all. Looking at the ChocolateyGUI web page it says to do a choco update ChocolateyGUI. The choco command is not recognized by Powershell even though Chocolatey is installed:

    Windows PowerShell
    Copyright (C) 2015 Microsoft Corporation. All rights reserved.

    Code:
    PS C:\Users\rrkurtz> Get-Packageprovider
    
    Name                     Version          DynamicOptions
    ----                     -------          --------------
    Chocolatey               2.8.5.130        SkipDependencies, ContinueOnFailure, ExcludeVersion, ForceX86, PackageSave...
    msi                      3.0.0.0          AdditionalArguments
    msu                      3.0.0.0
    NuGet                    2.8.5.204        Destination, ExcludeVersion, Scope, Headers, FilterOnTag, Contains, AllowP...
    PowerShellGet            1.0.0.1          PackageManagementProvider, Type, Scope, InstallUpdate, PackageManagementPr...
    Programs                 3.0.0.0          IncludeWindowsInstaller, IncludeSystemComponent

    Code:
    PS C:\Users\rrkurtz> choco
    choco : The term 'choco' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
    the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + choco
    + ~~~~~
        + CategoryInfo          : ObjectNotFound: (choco:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    Is there a better place to ask about this since it doesn't really have anything to do with PowerShell PackageManagement. Or is there a way to do the update via PowerShell PackageManagement instead of chocolatey?

    This is the error I get:

    PowerShell PackageManagement (OneGet) - Install Apps from Command Line-chocolateygui-error.jpg
      My Computers


  2. Posts : 17,661
    Windows 10 Pro
    Thread Starter
       #101

    I am working on updating both tutorial and video, it will be done today / tonight.

    Ztruker said:
    Kari, I was working through this today and ran into 1 problem which was easy to fix.
    Step 3.2 says This did not happen for me. I had to add NuGet separately.
    One change in PacketManagement (OneGet) is that NuGet is no longer installed when Chocolatey package provider is installed. Instead it will now be automatically installed when you install first package using PacketManagement, from Chocolatey or any other provider. However, this is something you as a user don't have to think; installing NuGet is and remains automatic, it's just done at different stage now. A user don't have to (and is recommended not to) install NuGet manually.

    Ztruker said:
    I opted to install ChocolateyGUI as a test and it installed fine but doesn't work at all. Looking at the ChocolateyGUI web page it says to do a choco update ChocolateyGUI. The choco command is not recognized by Powershell even though Chocolatey is installed
    Chocolatey as an indepently running stand-alone package manager and repository is not the same thing as Chocolatey package provider in PowerShell Package Management. All choco install xxx, choco update xxx and other choco commands refer to stand-alone Chocolatey, not PowerShell PacketManagement.

    Chocolatey package manager can be run on Windows Vista and later, whereas PowerShell PacketManagement using Chocolatey repositories requires Windows Management Framework V5 which was first presented in Windows 10 and Windows Server 2016.

    Quoted note from the very beginning of this tutorial:

    Note   Note
    If you are not familiar with package managers I recommend you read first the short Chocolatey package manager tutorial at our sister site Windows Eight Forums as an introduction to this tutorial: Chocolatey - Install Apps from Command Line. Although written for Windows 8 the tutorial can be used without any modifications in Windows 10.


    In your example case now you need to install this independent Chocolatey package manager, then run the choco update ChocolateyGUI from Chocolatey.

    Kari
    Last edited by Kari; 26 Apr 2016 at 16:20. Reason: Accidentally told Chocolatey can run on XP and later; correct is Vista and later!
      My Computer


  3. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #102

    Got it, thanks Kari. Great stuff.
      My Computers


  4. Posts : 29,078
    Windows 10 21H1 Build 19043.1023
       #103

    Question:

    I have installed a number of packages on Build 14379 with PowerShell, but Irfanview refuses to install. I have tried irfanview, IrfanView, etc., but it still refuses. I've checked the spelling, and have it right.

    I've checked my whole computer, including apps and features, add/remove apps, and it's not showing up as installed.

    I have gone to the Official IrfanView site and downloaded it, but don't want to install until a resolution has been found; that is if there is one.
      My Computer


  5. Posts : 17,661
    Windows 10 Pro
    Thread Starter
       #104

    Wynona said:
    Question:

    I have installed a number of packages on Build 14379 with PowerShell, but Irfanview refuses to install. I have tried irfanview, IrfanView, etc., but it still refuses. I've checked the spelling, and have it right.

    I've checked my whole computer, including apps and features, add/remove apps, and it's not showing up as installed.

    I have gone to the Official IrfanView site and downloaded it, but don't want to install until a resolution has been found; that is if there is one.

    For the first, you can always check the availability of packages on Chocolatey site with typing the following URL:

    Code:
    https://chocolatey.org/packages?q=IrfanView

    Replace IrfanView in above URL with package you are looking for. Screenshot below, #1 (green dot) indicates that the package is available, a red one would have meant the package is not available at the moment. The correct package name to be used in PowerShell PackageManagement is the one marked with #2:
    PowerShell PackageManagement (OneGet) - Install Apps from Command Line-2016_07_02_17_09_511.png

    The above screenshot shows you have used correct package name.

    I decided to see if I can find out the reason for your install issue. Tried to install IrfanView to see the error message, got it. It indicates application incompatibility or faulty package ("Process exited with non-successful exit code").

    Because I saw that the first part of install process worked, PowerShell downloading the installer. I went to %temp%\Chocolatey folder where installers are temporary stored, opened IrfanView folder and run installer manually getting below message:
    PowerShell PackageManagement (OneGet) - Install Apps from Command Line-2016_07_02_17_16_512.png
    (Click to pop-out, click again to enlarge.)

    Looks as if the currently available IrfanView package is not compatible with Windows 10, at least x64 version of latest Insider build.

    Kari
      My Computer


  6. Posts : 29,078
    Windows 10 21H1 Build 19043.1023
       #105

    Kari said:
    For the first, you can always check the availability of packages on Chocolatey site with typing the following URL:

    Code:
    https://chocolatey.org/packages?q=IrfanView

    Replace IrfanView in above URL with package you are looking for. Screenshot below, #1 (green dot) indicates that the package is available, a red one would have meant the package is not available at the moment. The correct package name to be used in PowerShell PackageManagement is the one marked with #2:
    PowerShell PackageManagement (OneGet) - Install Apps from Command Line-2016_07_02_17_09_511.png

    The above screenshot shows you have used correct package name.

    I decided to see if I can find out the reason for your install issue. Tried to install IrfanView to see the error message, got it. It indicates application incompatibility or faulty package ("Process exited with non-successful exit code").

    Because I saw that the first part of install process worked, PowerShell downloading the installer. I went to %temp%\Chocolatey folder where installers are temporary stored, opened IrfanView folder and run installer manually getting below message:
    PowerShell PackageManagement (OneGet) - Install Apps from Command Line-2016_07_02_17_16_512.png
    (Click to pop-out, click again to enlarge.)

    Looks as if the currently available IrfanView package is not compatible with Windows 10, at least x64 version of latest Insider build.

    Kari
    Thank you very much, Kari. I had seen the error you show when I had tried to install Gimp, Irfanview and Malwarebytes all at the same time, but since I'm pretty much the newbie with PowerShell, I thought none of them had installed. Then I found that Gimp and Malwarebytes had installed, so from there, I was totally confused.

    I went forward and installed several more packages, learning as I went that there was sometimes a delay between hitting Enter and the event happening. Everything but IrfanView installed, so I never even had a thought that IrfanView isn't compatible.

    So, at this point, it seems that when something throws an error, a retry of the same thing won't throw the error a second time. I realize it's most likely a "won't fix" item, but I will now go to Feedback and at least register my confusion on the issue.

    Thanks again.
      My Computer


  7. Posts : 17,661
    Windows 10 Pro
    Thread Starter
       #106

    Wynona, just a reminder:

    PowerShell PackageManagement stops executing a command when an error like this with IrfanView occurs. An Install-Package command stops there and does not install packages listed after it.

    An example: If you use this command to install a few packages with IrfanView now at the end of the list, all other packages before it would be installed but execution would be stopped when this incompatibility issue occurs:

    Code:
    Install-Package Malwarebytes, Skype, vlc, Adobereader, GoogleChrome, IrfanView

    But let's swap the order and say you would use this command instead:

    Code:
    Install-Package Malwarebytes, Skype, IrfanView, vlc, Adobereader, GoogleChrome

    Now Malwarebytes and Skype would install but then the execution would stop by IrfanView, therefore vlc, Adobereader and GoogleChrome packages would not be installed.

    When this error occurs, check the red error message to find the culprit:
    PowerShell PackageManagement (OneGet) - Install Apps from Command Line-2016_07_02_19_37_351.png

    You can now repeat the command, this time excluding all packages you had mentioned before IrfanView, IrfanView itself and run the command with packages you had originally mentioned after the culprit package, vlc, Adobereader and GoogleChrome in this example.
      My Computer


  8. Posts : 29,078
    Windows 10 21H1 Build 19043.1023
       #107

    Thanks for the explanation, Kari. Makes sense to me now, but there will be a whole lot of folks who won't understand. Anyway, it's now a moot point that has been explained.
      My Computer


  9. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #108

    A normal install of IrfanView X64 from the IrfanView web site installs and runs okay. Any way to tell if the IrfanView package on Chocolaty is 32 or 64 bit? Seems like either should install.
      My Computers


  10. Posts : 17,661
    Windows 10 Pro
    Thread Starter
       #109

    Chocolatey has very little information about this package, no bit version mentioned: Chocolatey Gallery | IrfanView 4.42.0.20160616
      My Computer


 

Tutorial Categories

PowerShell PackageManagement (OneGet) - Install Apps from Command Line Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:17.
Find Us




Windows 10 Forums