MAX_PATH - how to increase

I am serving a developer trying to port a Linux source tree to dockerized Windows tools (i.e. Windows flavor images) - essentially for compiling the c files with gcc.Everything is done through command line applications, like gcc.

The problem: This source tree is extremely deep. The path lengths way exceeds the classical 260 char MAX_PATH. According to the Windows documentation, two requirements must be met: First, set
HKLM\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled to 1. That causes no problems.

I have tried it: This alone will not serve to make cmd.exe accept longer paths.

Second: “The application manifest must also include the longPathAware element”. Fine, if you are writing a Windows application. I am not.

Is there any way to do something similar to force the cmd.exe in the serverbase image to behave as if it had such a manifest entry (i doubt that it has any manifest at all!)? I can switch to PowerShell (but then I have to learn it… :slight_smile: - but would that help me at all?

Could I write a .net console application that mimics cmd.exe? If that is easy, then I am sure someone as already done it, and I don’t have to.

Or is there no way to make Windows flavor images handle longer paths for CLI applications?