Skip to main content

What is the best way to have automox execute two one line commands? the commands would be:

 

winget install Microsoft.DotNet.DesktopRuntime.7

winget install Microsoft.DotNet.AspNetCore.7

 

would i create a worklet with both remedaition and execution code to something like this:

winget install Microsoft.DotNet.DesktopRuntime.7 && winget install Microsoft.DotNet.AspNetCore.7

 

i dont know if the && works the same way in windows as it does linux?

In PowerShell, if you wanted to include it all on one line you’d separate the statements with a semicolon:

winget install Microsoft.DotNet.DesktopRuntime.7; winget install Microsoft.DotNet.AspNetCore.7

 

But regarding readability, we typically just use two lines for things like this.

 

It is worth noting, a feature request to install multiple Winget packages in a single line ( winget install DesktopRuntime.7 AspNetCore.8 ) is currently in testing!


Reply