aaronparker / vcredist

Lifecycle management for the Microsoft Visual C++ Redistributables
https://vcredist.com
MIT License
129 stars 18 forks source link

Feature Request: Save to Generic UNC and Install from UNC Path. #168

Open miawri opened 3 months ago

miawri commented 3 months ago

It would be good if we could save the redists to a UNC file path root and then install/update any/all necessary redists within that UNC folder root.

Is that possible with the current tools by forcing any of the import functions and the install function?

Thanks in advance.

aaronparker commented 3 months ago

You should be able to use a UNC path with Save-VcRedist, e.g.:

Save-VcRedist -Path \\server\share\vcredist
miawri commented 3 months ago

Thanks for the reply - that allows me to download the installers to the unc....

How would I go about installing the Redists in \server\share?

If I try

$VcRedists = Get-VcList  -Architecture x64
Install-VcRedist -VcList $VcRedists -Path \\server\share

I get WARNING: Parameter 'Path' is obsolete. This parameter is not longer supported. The Path property must be on the object passed to -VcList

I've tried exporting the .json and pointing the -Path at that with no joy.

Thanks in advance!

aaronparker commented 3 months ago
$VcRedists = Get-VcList  -Architecture x64 | Save-VcRedist -Path \\server\share
Install-VcRedist -VcList $VcRedists
miawri commented 3 months ago

Will this command try to resave the Redists each time a client runs the command? I just want the clients to install the redists that I have saved to the server share.

aaronparker commented 3 months ago

No, Save-VcRedist won't redownload the file if it's already in the share, but it updates the output from Get-VcList with the path to each installer.

miawri commented 3 months ago

Amazing, thank you.