okibcn / wslcompact

Compacts the size of the ever-growing WSL vhdx images.
https://github.com/okibcn/wslcompact
GNU General Public License v3.0
805 stars 19 forks source link

installation broken: "Internet Explorer engine is not available" #16

Open Spongman opened 1 year ago

Spongman commented 1 year ago
PS C:\> iwr -useb https://raw.githubusercontent.com/okibcn/wslcompact/main/setup | iex
Downloading WslCompact...iwr : The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing
parameter and try again.
At line:45 char:10
+ $ZIPURL=(iwr https://api.github.com/repos/okibcn/wslcompact/releases/ ...
+          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotImplemented: (:) [Invoke-WebRequest], NotSupportedException
    + FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Invoke-WebRequest : Cannot validate argument on parameter 'Uri'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
At line:48 char:5
+ iwr $ZIPURL -OutFile "$WCTEMP/wclatest.zip"
+     ~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Invoke-WebRequest], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Done.
Expand-Archive : The path 'C:\Users\User\AppData\Local\Temp/wslcompacttemp/wclatest.zip' either does not exist or is not a valid file system path.
At line:50 char:1
+ Expand-Archive -LiteralPath "$WCTEMP/wclatest.zip" -DestinationPath " ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (C:\Users\User...mp/wclatest.zip:String) [Expand-Archive], InvalidOperationException
    + FullyQualifiedErrorId : ArchiveCmdletPathNotFound,Expand-Archive

Copy-Item : Cannot find path 'C:\Users\User\AppData\Local\Temp\wslcompacttemp\WslCompact' because it does not exist.
At line:51 char:1
+ Copy-Item "$WCTEMP/WslCompact" "$TARGET" -Force -Recurse | Out-Null
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\User...temp\WslCompact:String) [Copy-Item], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand

WslCompact Module installed. Type wslcompact -h to know more about it.
PS C:\> wslcompact -h
wslcompact : The term 'wslcompact' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:1
+ wslcompact -h
+ ~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (wslcompact:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\> $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      19041  2673
assist726 commented 1 year ago

Encountered the same problem so ended up going with Scoop to install instead.