Skip to content

Test-DISMFromOSDCloudUSB always enumerates to True for Lenovo devices #181

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

Closed
skyblaster opened this issue Oct 18, 2024 · 5 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@skyblaster
Copy link
Contributor

When testing on a Lenovo and the following folder is present, the Test-DISMFromOSDCloudUSB function enumerates to True, even though a $ComputerProduct sub folder does not exist:
E:\OSDCloud\DriverPacks\DISM\Lenovo\

This is due to "PackageID": null, statements in the Lenovo DriverPack Catalog

Causing line 30 to fail to complete the path:

$DriverPathPackageID = "$($OSDCloudDriveLetter):\OSDCloud\DriverPacks\DISM\$ComputerManufacturer\$PackageID"

And line 41 to return True

elseif (Test-Path $DriverPathPackageID){Return $true}

@skyblaster
Copy link
Contributor Author

Further testing on a Dell Latitude 5400, the following folder produces a True result:
E:\OSDCloud\DriverPacks\DISM\Dell\08B8\

Whereas the following PackageID folder results in False:
E:\OSDCloud\DriverPacks\DISM\Dell\84RYJ\

I'm not sure how to explain this one at the moment.

@skyblaster
Copy link
Contributor Author

To resolve the PackageID issue for HP and Dell, the following two lines simply need to be reversed:

$PackageID = $DriverPack.PackageID
$DriverPack = Get-OSDCloudDriverPack -Product $ComputerProduct

@gwblok
Copy link
Collaborator

gwblok commented Oct 24, 2024

Thanks @skyblaster, Sorry, been away from my computer for awhile, and still will be barely around for a bit.
Thanks for spotting that issue with lines 24 & 25 switched.

Is this entire things resolved now, or are you still having some issues?
My test pool of Lenovo devices isn't good. I have a T480 laptop.

Let me know if you're still having issues and I'll put it on my list to look into.

Glad someone is using this feature, I've been loving it, but 95% of my testing is on HP devices, and it's been working well.

@gwblok gwblok self-assigned this Oct 24, 2024
@gwblok gwblok added the bug Something isn't working label Oct 24, 2024
@gwblok gwblok pinned this issue Oct 24, 2024
@skyblaster
Copy link
Contributor Author

Thanks @gwblok. I believe the merge resolves the issue completely, so I'll close the issue now.

I'll do more testing once it's been pushed to the PSGallery. If I happened to break anything I'll open a new issue and hopefully another PR to fix.

@gwblok
Copy link
Collaborator

gwblok commented Oct 24, 2024

@skyblaster , thanks so much for being on top of that and digging through the code.
With the new baby, and taking care of the other 8 kids, I've been a bit overwhelmed. This is my first night on my computer in the last week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants