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.
-
AuthorPosts
-
-
December 16, 2020 at 11:19 am #280284
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!
-
December 17, 2020 at 6:37 pm #280599
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?
-
December 17, 2020 at 8:52 pm #280614
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.
-
This reply was modified 1 month ago by
-
-
AuthorPosts
- You must be logged in to reply to this topic.