# The Wiert Corner – irregular stream of stuff

• ## Email Subscription

Join 2,364 other followers

# Archive for May, 2021

## Chocolatey: vcredist 2005/2008/2010 updates failing as Microsoft rebuilt the installers multiple times causing new hashes each time

Posted by jpluimers on 2021/05/14

The Microsoft rebuilt move affects these Chocolatey Microsoft Visual C++ Redistributable packages, usually multiple times:

You get error messages like this:

ERROR: Checksum for 'C:\Users\saroot\AppData\Local\Temp\chocolatey\vcredist2010\10.0.40219.2\vcredist_x86.exe' did not meet '66B797B3B4F99488F53C2B676610DFE9868984C779536891A8D8F73EE214BC4B' for checksum type 'sha256'. Consider passing the actual checksums through with --checksum --checksum64 once you validate the checksums are appropriate. A less secure option is to pass --ignore-checksums if necessary

### jberezanskicommented

Great, Microsoft is apparently on an in-place installer update spree.

Actually, this is not a problem with vcredist-all, but rather with those specific packages and should be reported to maintainers of those packages. It so happens, however, that I’m also one of the maintainers of vcredist2008 and vcredist2010 (which live in https://github.com/chocolatey-community/chocolatey-coreteampackages/tree/master/manual). I’ve already prepared a fix for 2010 and I guess I’ll do 2008 tomorrow.

As for 2005, I can see that it has the same maintainer as vcredist2010 had until very recently – when we took over that package because the maintainer did not respond. So we probably should take over 2005, too.

Progress

The vcredist2010 package has been modified two times for this:

Hopefully the vcredist2008 and vcredist2005 packages will follow soon.

–jeroen

## VMware Standalone Converter: more recent versions do not support older operating systems

Posted by jpluimers on 2021/05/14

It pays to keep several versions of VMware Standalone Converter at hand as newer supporters do support newer operating systems and ESXi versions, but do not support older operating systems.

Hopefully the free StarWind V2V converter that does also support P2V has a broader support for older versions.

–jeroen

[WayBack] Free Tools VMware VMware vSphere goodies and freebies. VMware Monitoring tools, backup. Those tools are Free to use in production environment, no time limit

## NFS server on Windows

Posted by jpluimers on 2021/05/14

One way to access files from ESXi is over NFS shares.

Out of the box, Windows Server is the only edition that provides NFS server capability, but desktop editions only have an NFS client.

There are some commercial and open sources implementations though, of which [WayBack] GitHub – winnfsd/winnfsd seems the best maintained open source one.

In case I ever need NFS server support, I need to check out these links:

–jeroen

## How to calculate bitmap size? – Stack Overflow

Posted by jpluimers on 2021/05/13

A while ago I needed an estimate for [WayBack] How to calculate bitmap size? – Stack Overflow, which does an accurate calculation for the size of the pixel storage (i.e. without headers):

pixelStorageSize = (( width*bitsPerPixel + 31) / 32) * 4 * height

Here:

• 4 is the number of bytes per quad-byte as bitmaps are stored with pixel lines aligned on quad-byte boundaries
• 32 is the bits per quad-byte
• 31 helps to round up to the quad-word boundary

It was derived from [WayBack] Capturing an Image – Windows applications | Microsoft Docs and shorthand for what is explained at [WayBack] BMP file format: Pixel storage – Wikipedia

The bits representing the bitmap pixels are packed in rows. The size of each row is rounded up to a multiple of 4 bytes (a 32-bit DWORD) by padding.

For images with height above 1, multiple padded rows are stored consecutively, forming a Pixel Array.

The total number of bytes necessary to store one row of pixels can be calculated as:

{\displaystyle {\text{RowSize}}=\left\lceil {\frac {{\text{BitsPerPixel}}\cdot {\text{ImageWidth}}}{32}}\right\rceil \cdot 4=\left\lfloor {\frac {{\text{BitsPerPixel}}\cdot {\text{ImageWidth}}+31}{32}}\right\rfloor \cdot 4,}
ImageWidth is expressed in pixels, note the special parentheses.

The total amount of bytes necessary to store an array of pixels in an n bits per pixel (bpp) image, with 2ncolors, can be calculated by accounting for the effect of rounding up the size of each row to a multiple of 4 bytes, as follows:

PixelArraySize = RowSize · |ImageHeight|
ImageHeight is expressed in pixels. The absolute value is necessary because ImageHeight can be negative.

I think I needed this to estimate how many bitmaps would fit in

[WayBack] Virtual address space – Wikipedia, which on 32-bit Windows by default is limited to 2 GiB, and can be extended to 3 GIB by enabling the IMAGE_FILE_LARGE_ADDRESS_AWARE executable header flag.

This flag imposes the risk of many libraries and DLLs to fail because they do not get the pointer math right. You often do not have control of future versions of DLLs being loaded in your process space and their risks, so do not ever use that flag.

–jeroen

## Chocolatey: installing Oracle SQL Developer and updating the chocolatey package

Posted by jpluimers on 2021/05/13

Sometimes an install is not just as simple as C:\>choco install --yes oracle-sql-developer.

Edit 20210514:

Note that most of the below pain will be moot in the future as per [Archive.is] Jeff Smith 🍻 on Twitter: “we’re working on removing the SSO requirement, it’s already done for @oraclesqlcl – see here … “ referring to [Wayback] SQLcl now under the Oracle Free Use Terms and Conditions license | Oracle Database Insider Blog

SQLcl, the modern command-line interface for the Oracle Database, can now be downloaded directly from the web without any click-through license agreement.

It means the Oracle acount restriction will be lifted, and downloads will be a lot simpler.

I started with the below failing command, tried a lot of things, then finally almost gave up: Oracle stuff does not want to be automated, which means I should try to less of their stuff.

First of all you need an Oracle account (I dislike companies doing that for free product installs; I’m looking at Embarcadero too) by going to profile.oracle.com:

### Notes

• This version supports both 32bit and 64bit and subsequently does not have a JDK bundled with it. It has a
dependency on the jdk8 package to meet the application’s JDK requirement.
• An Oracle account is required to download this package. See the “Package Parameters” section below for
details on how to provide your Oracle credentials to the installer. If you don’t have an existing account, you can

### Package Parameters

The following package parameters are required:

/Username: – Oracle username
/Password: – Oracle password

(e.g. choco install oracle-sql-developer --params "'/Username:MyUsername /Password:MyPassword'")

To have choco remember parameters on upgrade, be sure to set choco feature enable -n=useRememberedArgumentsForUpgrades.

Then the installation failed fail again: ERROR: The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again. 

The trick is to RUN IEXPLORE.EXE AS ADMINISTRATOR ONCE BEFORE INSTALLING FROM CHOCOLATEY. Who would believe that.

The reason is that the package uses Invoke-WebRequest which requires Internet Explorer and PowerShell 3. Chocolatey packages however need to be able to run on just PowerShell 2 without Invoke-WebRequest.

Maybe using cURL can remedy that; adding a dependency to is is possible, as cURL can be installed via chocolatey: [WayBack] How to Install cURL on Windows – I Don’t Know, Read The Manual. Another alternative might be [WayBack] Replace Invoke-RestMethod in PowerShell 2.0 to use [WayBack] WebRequest Class (System.Net) | Microsoft Docs.