There seem to be logic in this repo for calling Oscdimg.exe for ISO-file creation on Windows when the cd_files command is used. This is good, but seem to require that Oscdimg.exe is already in PATH - or else packer will fail.
Request: Could it be possible to somehow auto-detect Windows ADK installations with Oscdimg.exe, so that users doesn't need to add the tool to PATH before calling packer?
Locating Oscdimg
Oscdimg.exe is installed to C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg on my Win11 machine. However, the "Windows Kits" path prefix may differ between machines, so you probably don't want to hardcode it. There's fortunately a HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots\KitsRoot10 registry key that seem to contain the "Windows Kits" installation path prefix. Combining the "KitsRoot10" registry key with "Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg" will likely be a fairly robust way of locating the Oscdimg installation path.
There seem to be logic in this repo for calling Oscdimg.exe for ISO-file creation on Windows when the
cd_filescommand is used. This is good, but seem to require thatOscdimg.exeis already in PATH - or else packer will fail.Request: Could it be possible to somehow auto-detect Windows ADK installations with
Oscdimg.exe, so that users doesn't need to add the tool to PATH before calling packer?Locating Oscdimg
Oscdimg.exe is installed to
C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimgon my Win11 machine. However, the "Windows Kits" path prefix may differ between machines, so you probably don't want to hardcode it. There's fortunately aHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots\KitsRoot10registry key that seem to contain the "Windows Kits" installation path prefix. Combining the "KitsRoot10" registry key with "Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg" will likely be a fairly robust way of locating the Oscdimg installation path.