From 191a59bda89bd68295d2619f634e652e263c9146 Mon Sep 17 00:00:00 2001 From: Drew Naylor Date: Sat, 24 Oct 2020 22:00:01 -0400 Subject: [PATCH] Working on the bulk installation feature. Not ready yet. --- libguinget/PackageTools.vb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/libguinget/PackageTools.vb b/libguinget/PackageTools.vb index bc836e1b..9271108f 100644 --- a/libguinget/PackageTools.vb +++ b/libguinget/PackageTools.vb @@ -54,6 +54,26 @@ Public Class PackageTools End Using End Sub + + Public Shared Sub BulkInstallPkg(PackageIDs As List(Of String), PackageVersions As List(Of String), Optional InstallInteractively As Boolean = False) + ' Define process variables to store winget's stuff. + ' CMD will be kept open with /k. + + Using proc As New Process + + proc.StartInfo.FileName = "cmd" + + ' Define interactive install flag. + Dim InteractiveFlag As String = String.Empty + If InstallInteractively = True Then + InteractiveFlag = " -i" + End If + + ' Define CMD args by going through the list of packages. + ' Be sure to only add && if there are packages left to add. + Dim BulkInstallCommandList As String = String.Empty + End Using + End Sub #End Region #Region "Get package details from YAML"