Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从powershell枚举URL方案_Powershell_Url_Registry - Fatal编程技术网

从powershell枚举URL方案

从powershell枚举URL方案,powershell,url,registry,Powershell,Url,Registry,嘿,我正在尝试枚举注册表中的URL方案,但不幸的是,这比我想象的要难一些 所以首先 New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT $REGPATH = "HKCR:\" Get-ChildItem "$REGPATH" Hive: HKEY_CLASSES_ROOT Name Property

嘿,我正在尝试枚举注册表中的URL方案,但不幸的是,这比我想象的要难一些

所以首先

New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
$REGPATH = "HKCR:\"
Get-ChildItem "$REGPATH" 



    Hive: HKEY_CLASSES_ROOT


Name                           Property                                                                                
----                           --------                                                                                
*                              AlwaysShowExt                         :                                                 
                               ConflictPrompt                        : prop:System.ItemTypeText;System.Size;System.Date
                               Modified;System.DateCreated                                                             
                               ContentViewModeForBrowse              : prop:~System.ItemNameDisplay;System.ItemTypeText
                               ;~System.LayoutPattern.PlaceHol                                                         
                                                                       der;~System.LayoutPattern.PlaceHolder;System.Dat
                               eModified;System.Size                                                                   
                               ContentViewModeForSearch              : 
[....]
ss                                                         
AcroAccess.AcrobatAccess.1     (default) : AcrobatAccess Class                                                         
acrobat                        URL Protocol :                                                                          
                               (default)    : URL:Acrobat Protocol                                                     
acrobat2018                    URL Protocol :
                               (default)    : URL:Acrobat Protocol                                              
我尝试将其筛选出来,只获取自定义方案,但没有得到好的结果:

New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
$REGPATH = "HKCR:\"
Get-ChildItem "$REGPATH" | Where-Object {$_.Property -Match "^(default)    : URL:.*"}

在这一点上,我认为这是最简单的方法:

New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
$REGPATH = "HKCR:\"
Get-ChildItem "$REGPATH" >> temp.txt
Select-String -Path .\tmp.txt -Pattern 'URL:'