I'm not an expert on Windows, so my apologies if this question is either stupid or not of a good quality.

I have a small software pipeline in Ubuntu (16.04 LTS) which is composed of few libraries (C++) and some python scripts. There's both custom code and some third party libraries. There's a top level unix script which essentially allows a user to download/install and create few environment variables (saving the hassle of doing all of these steps manually).

From few separate tests I know this libraries would also work on windows, but since for example there's no apt-get on windows I'm not really sure how to convert that top level script to windows.

Is there a common way to install and manage packages on windows which doesn't rely on power shell for example? Like something native in windows that could be used for the purpose.

I'm aware of vcpkg which I've been trying to use, but it doesn't seem extremely reliable, but it is still interesting because it's cross platform.

  • Aside from creating your own installer exe. One of the most common installers on Windows is MSI files which are installed using Windows Installer. You can create MSI files using WiX (not the website builder :) - wixtoolset.org ) for free. Basically a couple of command-line tools and some xml can generate you a MSI file. – HelpingHand May 2 '20 at 10:42
  • @HelpingHand Thank you for the comment, how can I create my own installer? I'm asking because I'm not sure about the license. The fact that is free doesn't mean I can use it unfortunately, because I have to avoid disclosure. – user8469759 May 2 '20 at 10:46

You do not need to create your own installer and can use Chocolatey package manager:

  • Add this command to your script to install choco via PowerShell:
    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
    This does not require you to use .vbscript or .ps1 scripts, can be used within .bat or .cmd scripts, and accessed via cmd.

    Then install python3 and pip3 via:
    choco install python3

You can also try to install the libraries you specified using choco. Try searching the official choco packages registry.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.