-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: current setup will not work inside winrm. #33
Comments
Hello,
Can you please provide a few examples/commands or screenshots? Without the logs I'm not sure at what point the script fails. The script your provided is essentially what this script does at some point, it's similar but not quite the exact same. Can you please try to get the script output? You can call the script and get the script output by doing this... &([ScriptBlock]::Create((irm asheroto.com/winget))) -Force -DebugMode *> C:\winget-install.log which will save the log to Or if you have the script locally you can just append |
Sorry just to clarify. The install script works and installs, however winget is currently not possible to run via winrm when it's installed in the standard layout. So while the install works its just not usable from winrm The link above shows an alternate method of install that puts all of the winget requirements into a single directory which then allows winget to run and install packages from winrm. So my request is to have a flag in the winget install script to install winget in the alternative fashion of having all the requirements in one folder and update the windows path. |
Ah I see. I'm trying to figure out what the difference is in the script. Maybe I can just add a line or two. It looks like it operates the same as the script in the link you mentioned, but it does not do this... cmd /c setx /M PATH "%PATH%;$ENV:PROGRAMFILES\WinGet" Can you check on your winrm instance and see if winget is installed to that folder and this command corrects the issue after running this script? I'm thinking maybe it's the |
Hello, We you able to fix the issue with that command? If that fixes it, I can add it to the script pretty quick. |
I tried to reproduce the issue but was unable to. After running the installation command and then Closing the issue now but if you have more information I can re-open it. |
Checklist
I have performed the steps in the Troubleshooting section and confirm that the issue only occurs with this script.
I have restarted my computer to confirm this is not a transitory problem.
I have verified that I am using the latest version of winget-install.
I have verified that this issue is NOT security related (please create security advisory if so).
I have run the script with the
-DebugMode
argument and included the output belowWhat You Are Seeing?
While winget will install with this script with winrm. it is not useable.
any attempt to use winget via winrm will be unable to actually update source lists & unable to accept any source agreement.
someone documented an alternative method of setup here: microsoft/winget-cli#256 (comment)
it would be nice if this method could be included in the winget-install script as an alternative install method flag for people wanting to use winget via winrm.
System Details
windows 2k22 server latest
issue detected when setting up an os with packer which uses winrm to manage the VM its building out
Additional Context
No response
Full Output With
-DebugMode
due to the packer setup its quite difficult for me to get these logs as the build fails and the VM is deleted
The text was updated successfully, but these errors were encountered: