andrew-s-taylor/public

detection logic

Closed this issue · 3 comments

Hi Andrew,

`$WingetPath = `$ResolveWingetPath[-1].Path

When detecting the .net 6 desktop runtime, I'm finding this code block is working on windows 11 , not windows 10 (As I write this, i'm just realising that I don't think i've deployed winget to windows 10 devices via intune...)

However - looking at the code:

a) the start-sleep 10 would seem redundant - if the first bit is just resolving the path, there doesn't seem to be an obvious reason to add a 10 second delay

b) Running this script as an admin seems to fail as the path isn't accessible (presumably as it's deploying from that location to C:\Users\paul\AppData\Local\Microsoft\WindowsApps\winget.exe)

Hi,
I seem to recally I put the delay in for something, but can't for the life of me remember why! I'll do some testing and see if it works without

  1. Which script fails when running as admin?

re 2 - I think I managed to not run as admin, so actually ignore that and i'll come back to you.

Detection logic fixed in latest version