Introduce Command Not Found module (#26319)

* Introduce Command Not Found module

* rewrite module to depend on WinGet PowerShell module

* address Dongbo's feedback

* try and implement settings UI

* fix SUI build; try and store PowerShell object

* add and use object pool

* apply Dongbo's feedback

* add warm up; implement IPooledObjectPolicy

* Add module interface

* WIP trying to import module from settings

* Add EnableModule.ps1

* spellcheck

* spellcheck again

* Installer. Add DisableModule.ps1

* Fix styling

* Give the user some output from installing

* Prettify the Settings controls

* Add button to check PowerShell 7's version

* Fix Settings Assets paths

* Fix PowerShell 7 output

* Make module enable and disable scripts give better information

* Fix spellcheck

* Fix image files and placeholders

* Don't remove CmdNotFound on upgrade and don't fail on uninstall of
CmdNotFound

* Consistent install module scripts location on debug and installed

* installer: Avoid messageboxes and hide powershell on uninstalling CmdNotFound

* Fix psd1 file resolution when installed

* Fix spellcheck

* Add telemetry events

* Fix gpo files

* If GPO is set, enable/disable module on PT start depending on gpo value

* Cleanup module interface

* Cleanup settings code

* If GPO is set, disable Settings page logic

* Adding icons

* Update settings UI and strings

* Add telemetry for suggestions and feedbacks

* Fix sln file

* Fix build

* minor fixes

* Updating icon

* Remove global.json

* Remove unused PowerShell dependency

* Don't use preview version of Automation and fix NOTICE

* Fix signing

* Fix NOTICE.md

* Fix version checking for getfilesiginforedist.dll

* Fix spellchecker

* Fix README.md

* Fix false positives section in expect.txt

* Add logs to module interface

---------

Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>
This commit is contained in:
Carlos Zamora
2024-01-03 07:43:42 -08:00
committed by GitHub
parent 3b90f73bd0
commit 46f5316858
65 changed files with 1633 additions and 63 deletions

View File

@@ -161,7 +161,6 @@ CHANGECBCHAIN
changecursor
CHILDACTIVATE
CHILDWINDOW
CHT
cidl
cim
CImage
@@ -182,6 +181,7 @@ clrcall
CLSCTX
Clusion
cmder
CMDNOTFOUNDMODULEINTERFACE
Cmds
CMIC
CMINVOKECOMMANDINFO
@@ -219,7 +219,6 @@ CONFIGW
CONFLICTINGMODIFIERKEY
CONFLICTINGMODIFIERSHORTCUT
CONOUT
constexpr
consts
contentdialog
contentfiles
@@ -319,7 +318,6 @@ DESKTOPABSOLUTEEDITING
DESKTOPABSOLUTEPARSING
desktopshorcutinstalled
desktopwindowxamlsource
DEU
devblogs
devdocs
devenum
@@ -508,6 +506,7 @@ GETCLIENTAREAANIMATION
GETDESKWALLPAPER
GETDLGCODE
GETDPISCALEDSIZE
getfilesiginforedist
GETICON
GETMINMAXINFO
GETPROPERTYSTOREFLAGS
@@ -538,7 +537,6 @@ Hanzi
Hardlines
hardlinks
HARDWAREINPUT
hashcode
Hashset
hashtag
HASHVAL
@@ -557,7 +555,6 @@ hcwhite
hdc
hdrop
hdwwiz
HEB
Helpline
helptext
HGFE
@@ -720,7 +717,6 @@ jif
jjw
jobject
jpe
JPN
jpnime
Jsons
jsonval
@@ -746,10 +742,7 @@ killrunner
Knownfolders
KSPROPERTY
Kybd
LAlt
Lambson
languagesjson
langword
lastcodeanalysissucceeded
Lastdevice
LAYOUTRTL
@@ -907,6 +900,8 @@ MOUSEHWHEEL
MOUSEINPUT
MOVESIZEEND
MOVESIZESTART
MOZILLAPL
MOZPL
mpmc
MRM
MRT
@@ -972,6 +967,7 @@ newdev
newitem
newpath
newrow
newsgroups
NIF
NLD
NLog
@@ -984,7 +980,6 @@ NOCLOSEPROCESS
NOCOALESCE
NOCOPYBITS
nodeca
nodiscard
nodoc
NODRAWCAPTION
NODRAWICON
@@ -1093,7 +1088,6 @@ pcch
pcelt
pch
PCIDLIST
pcs
PCWSTR
pdisp
pdo
@@ -1304,7 +1298,6 @@ RKey
RNumber
roadmap
rop
roundf
ROUNDSMALL
rpcrt
RRF
@@ -1320,12 +1313,11 @@ rundll
rungameid
RUNLEVEL
runsettings
runspace
runtimeclass
runtimeobject
runtimepack
runtimes
RUS
RValue
rvm
rwin
rwl
@@ -1506,7 +1498,6 @@ subquery
Superbar
sut
svchost
SVE
SVGIn
SVGIO
svgz
@@ -1579,7 +1570,6 @@ tlbimp
TMPVAR
TNP
toggleswitch
tonos
toolkitcontrols
toolkitconverters
Toolset
@@ -1715,7 +1705,6 @@ wcsnicmp
WDA
wdp
wdupenv
weakme
webbrowsers
webcam
webpage
@@ -1724,7 +1713,6 @@ wekyb
Wevtapi
wgpocpl
WIC
wifi
wil
winapi
winappdriver
@@ -1852,9 +1840,6 @@ zonable
zoneset
Zoneszonabletester
zzz
newsgroups
MOZILLAPL
MOZPL
# FALSE POSITIVES

View File

@@ -118,6 +118,9 @@ aka\.ms/[a-zA-Z0-9]+
# YouTube url
\b(?:(?:www\.|)youtube\.com|youtu.be)/(?:channel/|embed/|user/|playlist\?list=|watch\?v=|v/|)[-a-zA-Z0-9?&=_%]*
# power shell gallery website
\bpowershellgallery.com/[-_a-zA-Z0-9()=./%]*
# uuid: (or CompGUIDPrefix)
L?(["']|[-<({>]|\b)[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{10,12}(?:\g{-1}|[<})>])