winutil icon indicating copy to clipboard operation
winutil copied to clipboard

The app wont open.

Open DoesNet opened this issue 3 years ago • 1 comments

I ran the command: iwr -useb https://christitus.com/win | iex and it says this: iex : At line:7961 char:5

  • class WingetFailedInstall : Exception {
    
  • ~~~~~
    

Class keyword is not allowed in ConstrainedLanguage mode. At line:7961 char:11

  • class WingetFailedInstall : Exception {
    
  •       ~~~~~~~~~~~~~~~~~~~
    

Unexpected token 'WingetFailedInstall' in expression or statement. At line:7967 char:5

  • class ChocoFailedInstall : Exception {
    
  • ~~~~~
    

Class keyword is not allowed in ConstrainedLanguage mode. At line:7967 char:11

  • class ChocoFailedInstall : Exception {
    
  •       ~~~~~~~~~~~~~~~~~~
    

Unexpected token 'ChocoFailedInstall' in expression or statement. At line:7973 char:5

  • class GenericException : Exception {
    
  • ~~~~~
    

Class keyword is not allowed in ConstrainedLanguage mode. At line:7973 char:11

  • class GenericException : Exception {
    
  •       ~~~~~~~~~~~~~~~~
    

Unexpected token 'GenericException' in expression or statement. At line:1 char:26

  • irm christitus.com/win | iex
  •                      ~~~
    
    • CategoryInfo : ParserError: (:) [Invoke-Expression], ParseException
    • FullyQualifiedErrorId : ClassesNotAllowedInConstrainedLanguage,Microsoft.PowerShell.Commands.InvokeExpressionCom mand

Steps to reproduce the behavior:

  1. Open windows powershell
  2. Run as administrator
  3. run this command iwr -useb https://christitus.com/win | iex
  4. error.

It was suppose to open the app.

image

DoesNet avatar Dec 04 '23 12:12 DoesNet

I believe what you're dealing with is relevant to: https://devblogs.microsoft.com/powershell/powershell-constrained-language-mode/

PowerShell Constrained Language is a [language mode](https://devblogs.microsoft.com/powershell/a-comparison-of-shell-and-scripting-language-security/) of PowerShell designed to support day-to-day administrative tasks, yet restrict access to sensitive language elements that can be used to invoke arbitrary Windows APIs.

I don't believe this is a direct issue with WinUtil.

munkk01 avatar Dec 04 '23 17:12 munkk01