Support workload pack groups for repair, download, and show URL operations#25829
Conversation
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
f2d30a2 to
7830222
Compare
Refactors and combines a lot of the logic to download packages to cache or print the URLs to the packages for the workload install and workload update commands.
7830222 to
bca2080
Compare
| Directory.Delete(targetPath, true); | ||
| } | ||
|
|
||
| // Do we need to worry about signing validation here? I think not, as if the manifest is ever actually installed, it will go through signing validation |
There was a problem hiding this comment.
If the MSI is unsigned, the contents could be altered and we would be trusting the unsigned content. That would be the only concern here. Though the downloader should be verifying signatures
| $"TARGETDIR={msiExtractionPath}", | ||
| "/QN", // Quiet: No UI | ||
| } | ||
| }; |
There was a problem hiding this comment.
You should be able to get rid of this and use the native APIs we have in the CLI. WindowsInstaller.InstallProduct allows you to do that. The doc comments actually mentions admin installs.
_ = WindowsInstaller.SetInternalUI(InstallUILevel.None);
WidnowsInstaller.InstallProduct(msiPath, $"TARGETDIR={msiExtractionPath} ACTION=ADMIN");| var exitCode = psi.Execute(); | ||
| if (exitCode != 0) | ||
|
|
||
| _ = WindowsInstaller.SetInternalUI(InstallUILevel.None); |
There was a problem hiding this comment.
Did this work before without creating the directory first when you used MSIEXEC? Admin installs usually require having the TARGETDIR created before doing the install.
| @@ -1,5 +1,6 @@ | |||
| // Copyright (c) .NET Foundation and contributors. All rights reserved. | |||
| // Licensed under the MIT license. See LICENSE file in the project root for full license information. | |||
| // | |||
There was a problem hiding this comment.
nit: I'm guessing you didn't mean to add an extra commented line here
There was a problem hiding this comment.
👍 That's been bothering me for a while now, especially when creating new files in VS. I think it comes from
Line 159 in 60feccb
No description provided.