Code Monkey home page Code Monkey logo

Comments (2)

nagysifa avatar nagysifa commented on August 10, 2024 1

Thanks for the quick reply, using the first solution listed (temporarily disabling StrictMode), since it does not require modifying the SFTA script.

from ps-sfta.

Danyfirex avatar Danyfirex commented on August 10, 2024

Hello, Issue is related to the use Set-StrictMode -Version Latest. It arises an error due to the object property is not found. You can solve it in any of these three ways:

1.- Remove Set-StrictMode If it's possible.

2.- Use a try catch in the code at line 333:

  try {
      $allApplicationAssociationToasts += Get-ChildItem -Path HKLM:SOFTWARE\Clients\StartMenuInternet\* , HKCU:SOFTWARE\Clients\StartMenuInternet\* -ErrorAction SilentlyContinue | 
      ForEach-Object {
      (Get-ItemProperty ("$($_.PSPath)\Capabilities\" + (@("URLAssociations", "FileAssociations") | Select-Object -Index $Extension.Contains("."))) -ErrorAction SilentlyContinue).$Extension
      }  
    }
    catch {}

3.- Fix line 333 with Select-Object

(Get-ItemProperty ("$($_.PSPath)\Capabilities\" + (@("URLAssociations", "FileAssociations") | Select-Object -Index $Extension.Contains("."))) -ErrorAction SilentlyContinue) | Select-Object -ExpandProperty $Extension -ErrorAction SilentlyContinue

To set Notepad.exe as default You can use the ProgId:

Set-FTA 'txtfile' .ps1

from ps-sfta.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.