Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ObjectNotFound #2

Open
Birdseye232 opened this issue Jan 21, 2020 · 8 comments
Open

ObjectNotFound #2

Birdseye232 opened this issue Jan 21, 2020 · 8 comments
Assignees

Comments

@Birdseye232
Copy link

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

  • [System.IO.Compression.ZipFile]::ExtractToDirectory("$tempfolder\ ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (System.IO.Compression.ZipFile:TypeName) [], RuntimeException
    • FullyQualifiedErrorId : TypeNotFound

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

  • Get-ChildItem -Path "$tempfolder\wimboot-latest\*\wimboot" | Copy ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (D:\Temp\WIMan-master.tmp\wimboot-latest:String) [Get-ChildItem], ItemNotFoundException
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

OK
All Done!

@UXabre
Copy link
Owner

UXabre commented Jan 21, 2020

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

@UXabre UXabre self-assigned this Jan 21, 2020
@Birdseye232
Copy link
Author

Hi Arend,

  • PSVersion 5.1.14393.3383
  • OS: Windows Server 2016 1607 14393.3384
  • dotnet version is 461814

@UXabre
Copy link
Owner

UXabre commented Jan 23, 2020

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

@Birdseye232
Copy link
Author

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
Copy link
Owner

UXabre commented Jan 23, 2020

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
Copy link
Author

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
Copy link
Owner

UXabre commented Jan 24, 2020

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
Copy link
Owner

UXabre commented Feb 4, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants