ofelman / HPIA-Repository-Downloader

The script is designed to create and maintain HP Image Assistant offline repositories with a GUI interface, and to update the repository with scripted runtime options
11 stars 10 forks source link

OfflineMode Repository path invalid #7

Closed gmihailoo closed 2 years ago

gmihailoo commented 2 years ago

Currently using 1.92.02.ps1 - When running the script I am getting a 'offline repository path invalid' error when running in debug mode.

Here is an example of the switches / parameters i used: HPImageAssistant.exe /Debug /Operation:Analyze /Category:BIOS /Offlinemode:\server-name\HPIA-Test\Repository /BIOSPwdFile:\server-name\HPIA-Test\BIOSPassword\AdminPwd.bin /ReportFolder:c:\logs\HPIA

here is a selection of the errors in the debug file

02/17/2022 09:56:30 -- /OfflineMode Repository path invalid \server-name\HPIA-Test\Repository 02/17/2022 10:00:16 -- Exiting with exit code: InvalidParameters

I've tried to rule out things like permissions by adding 'everyone' access to the repository just for the sake of testing. it made no difference. I've attempted to shift the offlinemode switch after hpimageassistant.exe towards the end , in the middle, at the start, made no difference.

I attempted to wrap the switch shares in "" however hpimageassistant.exe isn't happy with this.

I reckon there's some sort of a bug here.

gmihailoo commented 2 years ago

Any idea Dan?

ofelman commented 2 years ago

it seems as if your /offlinemode switch points to an incorrect server path... the first part of the path that points to the share server name should have 2 '\" not just one, so your path should be something like this

/Offlinemode:\server-name\HPIA-Test\Repository

gmihailoo commented 2 years ago

I think that must have been github that cut that off. Found the issue hoping it helps the next person.

You MUST run the following on the repo folder before offline mode works. Once I did this everything works as expected.

Set-RepositoryConfiguration -Setting OfflineCacheMode -CacheValue Enable

ofelman commented 2 years ago

@gmihailoo that is correct... if the repository is created by the downloader script, it will do that automatically, but if connecting the script to an existing repo, the configuration has to be done by user