Install-Package – Run install.ps1

Welcome Forums General PowerShell Q&A Install-Package – Run install.ps1

  • This topic has 2 replies, 2 voices, and was last updated 1 month ago by
    Participant
    .
Viewing 2 reply threads
  • Author
    Posts
    • #280284
      Participant
      Topics: 34
      Replies: 113
      Points: 18
      Rank: Member

      Hello

      I am trying to execute a powershell script in my nuget (.nupkg) using the install-package cmdlet.

      I have  a tools folder and have tried both init.ps1  and install.ps1. the nuget package installs but  does NOT execute the .ps1.

      I was looking for a chocolatey alternative .

      Any help would be greatly appreciated!

    • #280599
      Senior Moderator
      Topics: 10
      Replies: 201
      Points: 1,096
      Helping Hand
      Rank: Community Hero

      There aren’t many alternatives to Chocolatey, but Scoop might do what you need. The github page claims “Scoop is also great at handling single-file programs and Powershell scripts.” I haven’t actually used it

      Also, do you get any errors when you install or attempt to execute the script? Have you tried doing so with debug output enabled?

    • #280614
      Participant
      Topics: 34
      Replies: 113
      Points: 18
      Rank: Member

      I am a big fan of chocolatey. I was looking for a way to execute packages that can execute a .ps1 file with just the install-package cmdlet ,  no “3rd party” dependencies.

      There are no errors , it installs the .nupkg  perfectly , it just doesn’t execute the ps1 that it has internally post-install.

      • This reply was modified 1 month ago by H Man.
Viewing 2 reply threads
  • You must be logged in to reply to this topic.