Git Product home page Git Product logo

Comments (2)

MelQL avatar MelQL commented on May 17, 2024 1

I agree that it would be nice for the script to somehow automatically find programs that are not in the registry location being searched. If they can't be automatically found, it would be nice to have a way to edit the program list with the path name so that can be searched if the program is not found in the registry location.

For example, the AppV Client application C:\Program Files (x86)\Microsoft Application Virtualization\Client UI\AppVClientUX.exe does not seem to have a reference in the registry location being searched.

For now, I'm customizing the MS script with an extra programs list and supporting function based on HarmVeenstra's solution to the ( https://github.com/HarmVeenstra/Powershellisfun/blob/main/ASRmageddon%20Create%20Common%20Shortcuts%20Start%20Menu/Create_Common_Shortcuts.ps1). It would be nice if the general support was directly in the MS Script (even we have to manually add to the programs list in script) so everyone has this support (and it has MS code/testing and avoid any mistakes I might make when trying to integrate).

from mde-powerbi-templates.

imnota avatar imnota commented on May 17, 2024

One other approach - could use the application compatibility telemetry under "HK_User:[userGuid]\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store"

Add a function:

function GetApplicationCompatibilityPaths { 
    #Get application Compatibility Info per user
    New-PSDrive HKU Registry HKEY_USERS|out-null
    $applicationPaths=@{}
    $userKeys=Get-ChildItem -Path "HKU:"
    $userKeys|foreach {
        try {
            $appCompat=Get-Item -Path "HKU:\$($_.pschildname)\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store" -ErrorAction SilentlyContinue
            if ($appCompat) {
                foreach($appPath in $appCompat.property) {
                    $AppExe=split-path $apppath -leaf
                    if ($appexe) {
                        $applicationpaths[$appexe]=$apppath
                    }
                }
            }


        } catch {
        }
    
    }
    remove-psdrive hku
    return $applicationPaths
}

Add a call to the function under line 93 ("LogAndConsole "Starting LNK rescue""):

$applicationPaths=GetApplicationCompatibilityPaths

Then, under line 119 (just before "if ($target -ne $null) {" ), add:

       if (-not $target) {
            $target=$applicationPaths[$_.value]            
        }

from mde-powerbi-templates.

Related Issues (19)

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.