Hyper: How to use PowerShell with Hyper?

Created on 29 Jan 2018  路  7Comments  路  Source: vercel/hyper

Question Windows

Most helpful comment

You'll probably want to remove --login from shellArgs as well. Example PowerShell config: https://gist.github.com/brandon93s/fcd4c2f00d16f140169344da3ba3ae15

All 7 comments

Update your .hyper.js file and change the "shell" variable to point your desired shell

shell: 'C:\\Windows\\System32\\WindowsPowerShell\\v1.0',

You'll probably want to remove --login from shellArgs as well. Example PowerShell config: https://gist.github.com/brandon93s/fcd4c2f00d16f140169344da3ba3ae15

Thank you guys!! 馃憤

FYI, for those running 64-bit Windows (it's 2018 and you should be!) you just have to replace the System32 from @aaronr0207 comment with SysWOW64

C:\\Windows\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell.exe

Regarding using the SysWOW64 version. Contrary to how it is named, it is actually the 32-bit version. You should use System32 if you want to use the 64-bit version.

You can verify this by querying for the size of intptr:

PS C:\> [intptr]::Size

This returns the size, in bytes

  • If using SysWOW64, the result is 4, which means it is 32-bit
  • If using System32, the result is 8, which means it is 64-bit

This makes sense because WoW64 is just a subsystem to emulate a 32-bit environment. Probably Microsoft just did not bother renaming System32 since a lot of systems have that as a dependency.

Source: How to Tell if PowerShell is 32-bit or 64-bit

The script in the article is quite old and might not work due to breaking changes in PowerShell, so you need to replace [System.Runtime.InterOpServices.Marshal]::SizeOf([System.IntPtr]) with [intptr]::Size)

You are giving me this error, how can I solve it?

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xscheiner picture xscheiner  路  73Comments

fabdelgado picture fabdelgado  路  102Comments

fabianschwarzfritz picture fabianschwarzfritz  路  48Comments

cristian-sima picture cristian-sima  路  51Comments

silvenon picture silvenon  路  94Comments