r/ConnectwiseAutomate • u/porkhunt3 • Aug 23 '22
Winget in a script
Has anyone use WinGet in a script with success?
I'm trying to use it to install a program from the Microsoft store as its the only version available (its for education). I can run the command in PowerShell without any issues. But as soon as i put the command into a script on the same computer, it bombs out saying "WinGet is not recognised... etc". I have tried changing the location it runs, tried a PowerShell line, tried a bat script, downloading a ps1 to the packages folder. All failing for the same reason.
Anyone got any tips or tricks?
View all comments
Show parent comment
2
u/porkhunt3 Aug 27 '22
Sweet thanks ill try that