• Using Winget to install your favorite software

    Home » Forums » Developers, developers, developers » DevOps Lounge » Using Winget to install your favorite software

    Author
    Topic
    #2543094

    Hey Y’all,

    I came across a post somewhere about using Winget to install software so I thought I’d give it a try. Here’s a simple powershell script to install some of my favorite software. The script is notated with the results as trying to install from the Windows Store did not work, it hung up on the Agreement prompt.

    [UPDATED: added NotePad++]

    #Install PowerShell Core
    winget install --id Microsoft.Powershell --source winget
    
    #Install Google Chrome -- Tested OK
    winget install google.chrome
    
    #Install Mozilla FireFox (Stable) -- Tested OK
    winget install Mozilla.FireFox
    
    #Install NotePad++  -- Tested OK -- No Desktop Icon!
    winget install "Notepad++" --Source winget
    
    #Install VLC Media Player  -- Tested OK
    winget install VideoLAN.VLC
    
    #Install MalwareBytes  -- Tested OK
    winget install Malwarebytes.Malwarebytes
    
    #Install Office 365 Subscription  -- Tested OK
    winget install Microsoft.Office
    
    #Install LibreOffice  -- Tested OK
    winget install TheDocumentFoundation.LibreOffice --source  winget
    
    #Install 7Zip  -- Tested OK
    winget install 7zip.7zip
    
    #Install Foxit Reader  -- Tested OK
    winget install Foxit.FoxitReader
    
    #Install USBDLM (USB Drive Letter Manager)  -- Tested OK
    winget install UweSieber.USBDLM --source winget
    
    #Install RoboForm  -- Tested OK
    winget install SiberSystems.RoboForm --source winget
    
    #Install OpenShell  -- Tested OK
    winget install Open-Shell.Open-Shell-Menu --source winget
    
    #Install AOMEI Partition Assistant  -- Tested OK
    winget install AOMEI.PartitionAssistant --source winget
    
    <#+--------------------------------------------------------+
      | To search for MS Store Apps:                           |
      | winget search "name" --source msstore                  |
      +--------------------------------------------------------+
    #>
    #Install Microsoft Quick Assist (From MS Store)  -- Tested Hangs on Terms Prompt
    winget install 9P7BP5VNWKX5 --source msstore
    
    #Install SysInternals  -- Tested Hangs on Terms Prompt
    winget install 9P7KNL5RWT25  
    
    #Install IrFanView 64  -- Tested Hangs on Terms Prompt
    winget install 9PJZ3BTL5PV6  --source msstore
    

    Note: Downloading from the Windows Store failed both on Win10 Pro and Tiny11B2 installations. Both were running from a Local Account and I also tried while being logged into the MS Store.

    Here’s what it looks like when it fails:

    PS> winget install 9P7BP5VNWKX5 --source msstore
    
       - 
       - 
    Found Quick Assist [9P7BP5VNWKX5] Version Unknown
    This package is provided through Microsoft Store. winget may need to acquire the
     package from Microsoft Store on behalf of the current user.
    Agreements for Quick Assist [9P7BP5VNWKX5] Version Unknown
    Version: Unknown
    Publisher: Microsoft Corp.
    Description: Help family and friends with their PC or get help from them using Q
    uick Assist. Use a remote connection to view their screen or request full contro
    l during a session, make annotations, use a laser pointer, and more to help fix 
    PC problems.
    License: ms-windows-store://pdp/?ProductId=9P7BP5VNWKX5
    Privacy Url: https://go.microsoft.com/fwlink/?LinkId=521839
    Agreements:
    Category: Utilities & tools
    Pricing: Free
    Free Trial: No
    Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
    Seizure Warning: https://aka.ms/microsoft-store-seizure-warning
    Store License Terms: https://aka.ms/microsoft-store-license
    
    
    The publisher requires that you view the above information and accept the agreem
    ents before installing.
    Do you agree to the terms?
    

    If anyone knows how to get the MS Store to work with Winget I’d be very appreciative.

    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!
    Computer Specs

    • This topic was modified 2 months, 2 weeks ago by RetiredGeek.
    3 users thanked author for this post.
    Viewing 8 reply threads
    Author
    Replies
    • #2543208

      RG – I can’t duplicate the errors you’re getting:

      winget_results

      Temporary store glitch? Or did you mean you want to ‘accept the terms’ automatically?

      If so, try, for example:

      winget install 9PJZ3BTL5PV6  --source msstore --accept-source-agreements

      Also, if you enter winget source list you’ll probably find that the MS Store is the default, i.e. first in the source list:

      winget_source_list

      Hope this helps…

    • #2543228

      Ok, I found the solution or at least part of it.

      #Install Microsoft Quick Assist (From MS Store)  -- Tested Hangs on Terms Prompt
      winget install 9P7BP5VNWKX5 --source msstore --accept-package-agreement
      
      #Install IrFanView 64  -- Tested Hangs on Terms Prompt
      winget install 9PJZ3BTL5PV6  --source msstore --accept-package-agreement
      
      #Install SysInternals  -- Tested Installed App? but won't work!
      winget install 9P7KNL5RWT25  --accept-package-agreement 
      

      SysInternals installs but when you try to run the app you get the What App do you want to use to open this dialog?

      [Update] Sorry Rick I posted this before I saw your post. I’d been testing it when I got called away.

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #2543231

      Hmm… from what I’ve now seen, it looks like you may need to add both agreement types, e.g.:

      winget install --ID 9WZDNCRFJ3PZ --accept-source-agreements --accept-package-agreements

      Hope this helps…

    • #2543263

      Rick,

      Even with both switches I still get this when I try to open the app.
      OpenAppDialog

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #2543303

      Which app are you referring to, RG?

      I’ve just tried installing IrfanView (using both agreement switches) from an elevated PS console (not script) and it installed and launched without any issues.

      winget install --ID 9PJZ3BTL5PV6 --source msstore --accept-source-agreements --accept-package-agreements

      Next, I uninstalled IrfanView then tried the same install command run from a script. Again, it installed and launched without any issues:

      winget_irfanview_install_from_script

    • #2543530

      SysInternals is the one I’m having problems with.

      RG – I believe your install was successful and that you may have clicked the Launch button in the notification:

      sysinternals_notification_sml

      There’s no front-end to the suite so, instead, it opens:

      store_sysinternals

      As  you have more than one browser installed, it’s asking you which one to use to take you there.

      I believe you’ll find the tools in:

      C:\Program Files\WindowsApps\Microsoft.SysinternalsSuite_2023.3.0.0_x64__8wekyb3d8bbwe\Tools

      Hope this helps…

    • #2543535

      Isn’t SysInternals portable app that needs download and extraction.

      That’s what winget does, and handles the unblocking of files downloaded from the internet… and a whole lot more.

      It’s great for uninstalling Store-based apps… which the new, re-written from scratch, Store and winget are trying to join seamlessly.

    • #2543583

      Well, this gets interestinger and interestinger!

      I just did an clean install of SysInternals and I got Funny Resulds:

      Search for AutoLogon.exe (known quanity)
      SysInternals-Search
      Open the Folder containing the files:
      SysInternals-Empty-Files
      Open the Secondary Directory with a funny name:
      SysInternals-Search2

      Rick, you’ll notice that they were not in the directory you suspected but rather in:

      
      C:\Users\Bruce\AppData\Local\Microsoft\WindowsApps
      

      and

      
      C:\Users\Bruce\AppData\Local\Microsoft\WindowsApps\Microsoft.Sysinternals_823kyb3d8bb23
      

      Of course they are all zero length files not very useful.

      Note: the ones in NonInstPrograms\Sysinternals are ones I copied from another machine.

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #2543620

      Of course they are all zero length files not very useful.

      I didn’t know where the suite of tools was installed at first so used Everything to look for them. I discounted the zero-byte locations as placeholders:

      sysinternals_everything

    Viewing 8 reply threads
    Reply To: Using Winget to install your favorite software

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: