UXabre / WIMan

WIMan is a Windows Image Generator for The Foreman. It creates both the WinPE file as well as the Windows images with a zero-hassle approach
MIT License
26 stars 12 forks source link

ObjectNotFound #2

Open Birdseye232 opened 4 years ago

Birdseye232 commented 4 years ago

i get this error message once i run the powershell script.

Extracting [4/4] Windows Server 2016 SERVERDATACENTER OK
    Adding drivers... Skipping
    Adding updates... Skipping
    Optimizing image... OK
    Commiting changes... OK
    Exporting 'Windows Server 2016 SERVERDATACENTER'...OK
    Writing entry to images.ini... OK
Copying boot files... Unable to find type [System.IO.Compression.ZipFile].

At D:\Temp\WIMan-master\GenerateWIM.ps1:172 char:5

Get-ChildItem : Cannot find path 'D:\Temp\WIMan-master.tmp\wimboot-latest' because it does not exist.

At D:\Temp\WIMan-master\GenerateWIM.ps1:174 char:5

OK All Done!

UXabre commented 4 years ago

Hi @Birdseye232,

Thanks for reaching out! As for the error, could you share with me the version of powershell you are using, what OS you are running this script on and what version of .NET is installed?

If the version of .NET is < v4.5 then this script won't run. I haven't actually tested for compatibility with various .NET version but I could improve that part if I'd know the version of .NET you have installed (others might also like the fact it runs on older .NET framwork versions)

Kind regards, Arend

Birdseye232 commented 4 years ago

Hi Arend,

UXabre commented 4 years ago

Hi, I've used a different method to extract the ZIP; if you could verify if this works for you? :-) Thanks!

Birdseye232 commented 4 years ago

hmm now i get:

PS D:\Temp\WIMan-master (1)\WIMan-master> .\GenerateWIM.ps1 No dedicated winpe.wim file found, we can fetch this automatically for you but this takes a few minutes. Do you want to continue? (Y/N): y Chocolatey v0.10.11 Installing the following packages: windows-adk-winpe;(1)\WIMan-master\.tmp\wadk-winpe" By installing you accept licenses for the packages. windows-adk-winpe v10.0.18362.1 already installed. Use --force to reinstall, specify a version to install, or try upgrade. Illegal characters in path. Failed installing WAIK-WINPE. Install it manually and copy the winpe.wim file to .\winpe.

UXabre commented 4 years ago

Hi, as what I understood from you other issue, you already had WAIK-WINPE installed on this machine? Perhaps could you copy the entire winpe folder to .\winpe\images Like this: image

Meaning the 4 architecture subfolders containing a boot.wim image (sorry for the extra effort, I'll need to figure out if I can detect if WAIK is already installed outside choco)

Birdseye232 commented 4 years ago

Hi, winpe was installed the first time on this vm once i run your script. After i run it the second time i got the error above. Where should this winpe folder with amd64, arm, arm64, x86 supposed to be located?

UXabre commented 4 years ago

hi! Normally these should be installed under the ..tmp (mind the extra dot) folder (it's hidden). But since you followed the procedure, it seems that this is a bug. Will try to re-create this on a new environment myself and see if how to resolve this bug

UXabre commented 4 years ago

Hi! I've updated the code a bit; and now I check if WAIK is already installed and where. If I've found the installation, I copy the WinPE files from that location. Can you check if this solves your problem? :-) (if choco installed it somewhere I didn't expect, I should find it anyway!)

Also, there was a bug on my end which prevented the detection of already installed winPE to work; so I suspect that this is the root cause for your problem