How to install specific version of windows sdk using chocolatey? - windows

I have C++ project with its target platform version type as 10.0.15063.0 and target platform as Windows 10.
I tried to create a azure pipeline that builds and publishes the artifacts, but I am facing issue to install windows sdk of specific version using choco(i.e 10.0.15063.x).
command tried :
choco install windows-sdk-10.0 --version=10.0.15063
I am getting error saying the package not found in the sources listed. Is there any way to fix the issue.

The version 10.0.15063.0 is not in the choco package list. As an alternative, you can download the installation from link, and install it via command.
Download bash command:
curl -LO "https://download.microsoft.com/download/E/1/B/E1B0E6C0-2FA2-4A1B-B322-714A5586BE63/windowssdk/winsdksetup.exe"
chmod 777 winsdksetup.exe # add permission for execution
Install in powershell silently:
Start-Process winsdksetup.exe -ArgumentList "/q" -Wait
Verify the version on my local machine:
However, the version number is strange, it shows 10.1.15063 actually in control panel.
So I can install it with choco command instead:
choco install windows-sdk-10.1 --version=10.1.15063.468 -y
Please check the version in regedit and control panel.

Doesn't look like that version is available. You can confirm this by searching for the package and listing all versions using choco list or choco search (search and list are synonyms for choco.exe):
choco list -a windows-sdk-10.0
Today, only one version is available: 10.0.26624. You can try to get the attention of the package maintainer on the package listing via the comments or Contact Maintainers link in the sidebar to update it or you can build your own and host on an internal feed for your use case.

Related

Unable to install playwright on a Windows due to not recognizing argument

I have verified on my windows that I have Powershell - the latest version installed.
When I run the command from the Playwright website :
pwsh bin/Debug/netX/playwright.ps1 install
I get the following error : 'argument bin/Debug/netX/playwright.ps1' is not recognized as the name of a script file. and I have been unable to find a work around. *
*to add more the error
There is an existing GitHub issue regarding this problem. To summarize the solutions listed there, here are a few things you can try:
Install the PowerShell tool:
dotnet tool install --global PowerShell
Or, Update the PowerShell tool:
dotnet tool update --global PowerShell
Or, Install PowerShell Core from the Microsoft website
Then, you can try to install playwright CLI and the browsers.
dotnet tool install --global Microsoft.Playwright.CLI
playwright install
If none if these solves your problem, kindly share in the comments.

Keep different install directory on choco upgrade

I've installed Firefox using Chocolatey to the different install directory C:\Software\Firefox with the following command: choco install firefox --params "/InstallDir:C:\Software\Firefox"
When upgrading Firefox via choco upgrade firefox, the Firefox installation gets moved from C:\Software\Firefox to the Firefox default C:\Program Files\Mozilla Firefox.
Can I somehow work around this behavior so that my custom install directory gets preserved even on choco upgrade?
Thanks!
I had to enable the Chocolatey feature useRememberedArgumentsForUpgrades with the following command:
choco feature enable --name=useRememberedArgumentsForUpgrades
After this, the install directory was preserved even when calling choco upgrade.

How do I uninstall Amazon Elastic Beanstalk Command Line Interface?

I recently ran the following command to install the Amazon Elastic Beanstalk Command Line Interface (EB CLI). I would now like to remove it from my Windows 10 machine.
C:\Users\Cale>pip install --upgrade --user awsebcli
What is the best command to run to ensure that its fully removed from my machine?
I was able to uninstall using the following command:
C:\Users\Cale>pip uninstall awsebcli
I was uncertain how to do the uninstall since I specified --user in the original install command. This stackoverflow article helped me understand that the --user option would not matter during the uninstall process.
How to uninstall a package installed with pip install --user
For me, the awsebcli is not present in the pip list command that references the $PATH. I get this error:
Skipping awsebcli as it is not installed.
Apparently, it's on the pip executable(s) in this location (Windows, PowerShell format):
$env:userprofile\.ebcli-virtual-env\Scripts\
The uninstall command worked properly using one of those executables.
After that, it it seems that deleting the .ebcli-virtual-env will remove it fully from the machine: How do I remove/delete a virtualenv? (disclaimer: I'm not a pythonista :) )

Docker on Windows Server 2016 & microsoft-build-tools

There is something that does not make sense in choco package microsoft-build-tools version 15.0.26228.0 in combination with Docker on Windows Server 2016:
Using following Dockerfile:
# Adopted from http://blog.alexellis.io/3-steps-to-msbuild-with-docker/
FROM microsoft/dotnet-framework:4.6.2
SHELL ["powershell"]
# Install Chocolatey
RUN Set-ExecutionPolicy Bypass
RUN iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
# Install dotnet 4.6.2
RUN choco install netfx-4.6.2-devpack -y
# Install MSBuild 15.0
RUN choco install microsoft-build-tools -y
CMD ["powershell"]
The logs, both docker and choco indicate success, but inside the container ./Program Files (x86)/Microsoft Visual Studio/2017 folder has not been created and msbuild.exe has not be extracted.
If, inside the container, I reinstall the microsoft-build-tools using choco: the folder is created and image is ready to build .net 4.6.2 code.
Any ideas/thoughts?
I have ended up installing the build tool on the workstation and adding it to the image using copy command (not sure it is allowed to distribute msbuild):
https://github.com/vkhazin/dotnet462-build/blob/master/Dockerfile
I ran into the same issue today. I didn't have any problems with my last project which required dotnet 3.5. This led me to my workaround.
When I based my new image on dotnet-framework:3.5 microsoft-build-tools install fine. If I use dotnet-framework:4.6.2 or dotnet-framework:4.7 nothing shows up.

How to install Watchman on Windows (win10)?

I am trying to install Watchman to my computer for npm for React Native. I opened the docs http://facebook.github.io/watchman/docs/install.html and can't understand how it should be done.
Could you please explain me more detailed?
For those using Chocolatey
(this is not published on the website yet, but found the info in the github repo):
Watchman is available to install via the Chocolatey Windows package manager. Installation is as simple as:
PS C:\> choco install watchman
Reference: https://github.com/facebook/watchman/blob/573b18b86b88759f31e83fa2e1837539d138de22/website/_docs/install.markdown#installing-on-windows-via-chocolatey
Beware that installing Chocolatey itself is somewhat tedious, but here is the link if you'd like to give it a go:
https://chocolatey.org/courses/installation
Load watchman archive by this instruction https://facebook.github.io/watchman/docs/install#binary-downloads-for-linux-macos-and-windows-beta
Create folder watchman in c:\Users\USERNAME\AppData\Local
Extract watchman archive to watchman folder. You must get c:\Users\USERNAME\AppData\Local\watchman\watchman.exe
Open path environment in
click on luppa (find) and insert settings: Edit the system environment variables -> Environment variables
OR System -> System Info -> Advance system settings -> Advance (tab) -> Environment variables
Set add to enviroment path c:\Users\USERNAME\AppData\Local\watchman
Re login in you system or reboot PC
Open terminal and run command watchman -v and you must see version
Here is the official guide to download Watchman on Windows.
Anyway I would post here not only how to download watchman but also the correct installation of it (the first steps I will copy from the official guide)
Go to https://github.com/facebook/watchman/actions?query=is%3Asuccess+event%3Apush+branch%3Amaster
Click on the CI label (the first CI label you can see)
2.1 Press on the first item you see. In the example is: "Updating submodules Summary: Github commits...
2.2 Choose "Windows"
3.Look in the top right of the resulting page for the Artifacts drop down
Click it to reveal the download artifacts link
5.Click that and extract the zip file
Now it comes the most important part that the official guide does not explain:
After
Extract the zip file and make sure that watchman.exe is located in a
directory that is in your PATH.
Go to C:\Users\YOUR_USERNAME\AppData\Local\
Create a folder called "watchman"
Copy there the files you've extracted (the most important one is watchman.exe)
So in your watchman folder, you'll have
Open Windows PowerShell as Administrator (If you don't have administrator privileges you can see the edit answer)
Now We'll create an environment variable so you can access watchman from anywhere. here is where setx comes in.
Copy and paste the following command (replace your username!)
setx path "%path%;C:\Users\YOUR_USERNAME\AppData\Local\watchman"
If everything is ok, you'll se a success message
Restart your computer
After restarting you can open again Windows PowerShell and run the following command:
watchman -v
If you can see the version, you've been installed watchman correctly
EDIT
Thanks #airstrike for your suggestion in the comments
You can run dialog (press Win+R) and type in
Rundll32 sysdm.cpl,EditEnvironmentVariables
Then create your user environment seeting the following path: C:\Users\YOUR_USERNAME\AppData\Local\watchman
Continue with the Step 7
You have to install Linux Bash Shell on Windows 10
After that run the following command on Bash
apt-get install python-dev libtool m4 automake pkg-config
git clone https://github.com/facebook/watchman.git
cd watchman/
git checkout v4.9.0
./autogen.sh
./configure
make
sudo make install
After a while I found the latest zip is here:
https://github.com/facebook/watchman/actions?query=is%3Asuccess+event%3Apush+branch%3Amaster
The latest version of watchman didn't have the watchman.exe file in it. So please use https://github.com/facebook/watchman/releases/tag/v2021.01.11.00 to download watchman and follow the instructions in #Andrey Patseiko's answer.
Watchman on Windows is currently in an alpha state. The link from the installation page links to this issue; the instructions are in the top post:
https://github.com/facebook/watchman/issues/19
If you are not comfortable following those instructions, then using Watchman is not yet for you.
You can install watchman on windows 10 with command below.
choco install watchman
You need to have choco installed already.
Unless, you should install choco with command below.
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
You would have to run Powershell in administrator mode and then run the following commands:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Then close the PowerShell terminal and reopen it in administrator more again and run this command:
choco install watchman

Resources