cloudbase / windows-imaging-tools

Tools to automate the creation of a Windows image for OpenStack, supporting KVM, Hyper-V, ESXi and more.
Apache License 2.0
684 stars 229 forks source link

".ctor" file not found! #393

Open NaseerAkbari opened 7 months ago

NaseerAkbari commented 7 months ago

the last command shows an error: New-WindowsOnlineImage -ConfigFilePath $ConfigFilePath translated to English:

New-Object : Exception when calling ".ctor" with 1 argument(s):
"The specified file could not be found."
In C:\Users\nsrakbr\Desktop\windows-imaging-tools\windows-openstack-imaging-tools\WinImageBuilder.psm1:121 chars:13
+
return (New-Object WIMInterop.WimFile -ArgumentList $WimFilePath)
+
+ CategoryInfo
InvalidOperation: (:) [New-Object], MethodInvocationException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands

guys, i am working on this custom image of windows since days, but i cant go further. can anyone help please?

image

hoppla20 commented 6 months ago

I ran into the same issue today. My problem was that I didn't mount the Windows ISO. After mounting the ISO (e.g. under E:\), you also have to correctly set the config wim_file_path to the install.wim inside the mounted ISO:

[DEFAULT]
...
wim_file_path=E:\sources\install.wim
...
Azziii commented 1 week ago

Check that the [DEFAULT] section for wim_file_path is defined.