msix-packaging
msix-packaging copied to clipboard
[BUG] Failed to load createcim.dll (or wvdutilities.dll). Please confirm the dll is next to this exe.
Project msixmgr
Describe the bug
Despite being in the same folder as the exe and all the attendant DLLs, msixmgr is complaining that they are not there. However a procmon trace is showing the image as loading fine.
C:\msixsrc\tool>msixmgr.exe -unpack -packagepath c:\msixsrc\tool\iikoOffice_7.4.7012.0_x64__x38xz7jh3b9tc-new.msix -destination c:\msixsrc\tool\iikoOffice.cim -create -vhdsize 2048 -filetype CIM -rootDirectory iikoOffice
Failed to load createcim.dll. Please confirm the dll is next to this exe.
Failed to remove the temp dir "C:\\msixsrc\\tool\\ca0fa9c6-a9f3-422d-8894-fd8d1bd066ea"
Ignoring this non-fatal error and moving on
Creating the CIM file c:\msixsrc\tool\iikoOffice.cim failed with HRESULT 0x8007007e
The above process expands and unpacks the files fine, but dies after a few minutes with above error.
If I try to create a VHDX instead, it fails immediately with this error:
C:\msixsrc\tool>msixmgr.exe -unpack -packagepath c:\msixsrc\tool\iikoOffice_7.4.7012.0_x64__x38xz7jh3b9tc-new.msix -destination c:\msixsrc\tool\iikoOffice.vhdx -create -vhdsize 2048 -filetype vhdx -rootDirectory iikoOffice
Failed to load wvdutilities.dll. Please confirm the dll is next to this exe.
Creating the VHD(X) file c:\msixsrc\tool\iikoOffice.vhdx failed with HRESULT 0x8007007e
procmon shows:
15:35:53.6498612 msixmgr.exe 7672 CreateFile C:\msixsrc\tool\WVDUtilities.dll SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
15:35:53.6498853 msixmgr.exe 7672 QueryBasicInformationFile C:\msixsrc\tool\WVDUtilities.dll SUCCESS CreationTime: 15/04/2021 00:43:34, LastAccessTime: 16/04/2021 15:29:32, LastWriteTime: 16/04/2021 15:29:32, ChangeTime: 16/04/2021 15:32:20, FileAttributes: A
15:35:53.6498960 msixmgr.exe 7672 CloseFile C:\msixsrc\tool\WVDUtilities.dll SUCCESS
15:35:53.6499860 msixmgr.exe 7672 CreateFile C:\msixsrc\tool\WVDUtilities.dll SUCCESS Desired Access: Read Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
15:35:53.6500187 msixmgr.exe 7672 CreateFileMapping C:\msixsrc\tool\WVDUtilities.dll FILE LOCKED WITH ONLY READERS SyncType: SyncTypeCreateSection, PageProtection: PAGE_EXECUTE|PAGE_NOCACHE
15:35:53.6501771 msixmgr.exe 7672 CreateFileMapping C:\msixsrc\tool\WVDUtilities.dll SUCCESS SyncType: SyncTypeOther
15:35:53.6502480 msixmgr.exe 7672 Load Image C:\msixsrc\tool\WVDUtilities.dll SUCCESS Image Base: 0x7ffe2aca0000, Image Size: 0x12000
15:35:53.6503124 msixmgr.exe 7672 CloseFile C:\msixsrc\tool\WVDUtilities.dll SUCCESS
To Reproduce As above
Expected behavior MSIX should create to CIM or VHDX file as instructed.
Platform Win20H2
PS C:\msixsrc\tool> get-filehash *.exe, *.dll
Algorithm Hash Path
--------- ---- ----
SHA256 D410434499BE3630CB8D4623C23D3BA8C771BD7AC369DCAA49568DD5466F37F0 C:\msixsrc\tool\msixmgr.exe
SHA256 D0D34F60A5E412C54DA8607E1CB5A7419B600363FC924FAF890743B24DB190AA C:\msixsrc\tool\ApplyACLs.dll
SHA256 4E9E349DEF32D3308457354A5C0838D8320098BA004BF0BAB9B94C3C3FABECD7 C:\msixsrc\tool\CreateCIM.dll
SHA256 C44897A3B025BE37345D8F6DEDDB7D6E21B4F9A427C7AE08D30C88064D5C227E C:\msixsrc\tool\msix.dll
SHA256 18300E0BE930BB491F572676E24C546C0BA162C08B98B38C2E9D3839880443F2 C:\msixsrc\tool\WVDUtilities.dll
I was having this issue as well but had just written a script accomplish creating a vhdx without ever calling on the msixmgr. Only when my team decided to start trying out the CIM extension did I revisit the issue. I was attempting to pack as a CIM or VHDX on a device different from the one used to create the msix packages. When the process was moved it to the capture device the issue resolved. I suspect it's due to the Feature Release level. The capture device is on 20H2 and the production device I was using to pack as a vhd(x) is still on 1909. I might upgrade the production device later to test if that resolves the issue.