How to install powershell on Wine?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Post Reply
qarmin
Level 1
Level 1
Posts: 5
Joined: Tue May 26, 2020 4:32 pm

How to install powershell on Wine?

Post by qarmin » Wed May 27, 2020 10:36 am

Hi,

Recently I tried to install Powershell but it needs at least WMF 4.0, but I can't find any method to install it because it provides msu files which I don't know how to use.

https://www.microsoft.com/en-us/downloa ... x?id=54616

qwertymnb
Level 4
Level 4
Posts: 135
Joined: Sun Jan 17, 2016 4:36 pm
Location: Eindhoven de gekste!

Re: How to install powershell on Wine?

Post by qwertymnb » Mon Jun 08, 2020 5:21 am

What installer of Powershell are you trying to use? Do you have link to the download so we could try?

Further AFAIK, wine does not handle some msu files properly yet (like this one apparently which is likely msdelta compressed); I made a homebrew winetricks-script some time ago to extract the archived files from such msu-files, but that probably won`t help much for the powershell installer as it probably also needs registrykeys (apart from the nuisance having to manually copying over the files to the correct locations); somehow in future wine should install those msu files properly

qarmin
Level 1
Level 1
Posts: 5
Joined: Tue May 26, 2020 4:32 pm

Re: How to install powershell on Wine?

Post by qarmin » Mon Jun 08, 2020 1:46 pm

https://github.com/PowerShell/PowerShel ... in-x64.msi

I wanted use it for installing choco because it would be a lot of easier tool to check a lot of software than manual installation of each package.

qwertymnb
Level 4
Level 4
Posts: 135
Joined: Sun Jan 17, 2016 4:36 pm
Location: Eindhoven de gekste!

Re: How to install powershell on Wine?

Post by qwertymnb » Mon Jun 08, 2020 5:15 pm

You can trick/fool the installer; it checks for the version of pwrshplugin.dll (a dll that wine doesn`t provide)

Trick/fool the installer with some dll:

cp -rf ~/.wine/drive_c/windows/system32/msxml3.dll ~/.wine/drive_c/windows/system32/pwrshplugin.dll
cp -rf ~/.wine/drive_c/windows/syswow64/msxml3.dll ~/.wine/drive_c/windows/syswow64/pwrshplugin.dll

Now the installer starts and completes. Then do "wine start pwsh.exe"

Regards

Post Reply