단축키 작성자 찾기

단축키 작성자 찾기

Windows 단축키/바로가기의 소스를 어떻게 찾나요? 나는 그것을 시작하는 키가 다음과 같다는 것을 알고 있습니다 . Ctrl그리고 그것이 실행되는 프로그램은 다음과 같습니다.AltM윈도우 익스플로러을 가리켰다내 문서폴더. 그런데 발신자의 위치를 ​​어떻게 알 수 있나요?

"소스"를 찾아서 다른 핫키를 만들 수 있도록 핫키를 제거하고 싶습니다.

우리는 상당히 안전한 컴퓨터를 사용하고 있으며 어떤 소프트웨어도 다운로드할 수 없으므로 문제를 해결하려면 Windows 고유의 무언가가 필요합니다.

중요한 경우 저는 Windows 7 64비트를 사용하고 있습니다.

답변1

vbs에는 모든 .lnk 바로 가기 파일을 열거하는 wmi 쿼리가 있지만 단축키 속성은 노출되지 않습니다.
wscript.shell comobject가 수행합니다.
저는 PowerShell을 선호합니다. 다음 스크립트는 다음에 있는 함수를 사용합니다.stackoverflow.com.
전체 c 드라이브를 반복하여 .lnk 파일을 찾고 핫키가 포함되어 있는지 확인합니다.

## Enum-ShortcutHotkeys.ps1
# Function from Tim Lewis https://stackoverflow.com/a/21967566/6811411
function Get-Shortcut {
  param(
    $path = $null
  )
  $obj = New-Object -ComObject WScript.Shell
  if ($path -eq $null) {
    $pathUser = [System.Environment]::GetFolderPath('StartMenu')
    $pathCommon = $obj.SpecialFolders.Item('AllUsersStartMenu')
    $path = dir $pathUser, $pathCommon -Filter *.lnk -Recurse 
  }
  if ($path -is [string]) {$path = dir $path -Filter *.lnk}
  $path | ForEach-Object { 
    if ($_ -is [string]) {$_ = dir $_ -Filter *.lnk}
    if ($_) {
      $link = $obj.CreateShortcut($_.FullName)
      $info = @{}
      $info.Hotkey = $link.Hotkey
      $info.TargetPath = $link.TargetPath
      $info.LinkPath = $link.FullName
      $info.WorkingDirectory = $link.WorkingDirectory
      $info.Arguments = $link.Arguments
      $info.Target = try {Split-Path $info.TargetPath -Leaf } catch { 'n/a'}
      $info.Link = try { Split-Path $info.LinkPath -Leaf } catch { 'n/a'}
      $info.Description = $link.Description
      $info.WindowStyle = $link.WindowStyle
      $info.IconLocation = $link.IconLocation
      New-Object PSObject -Property $info
    }
  }
}
Get-ChildItem -path c:\ -filter *.lnk -rec -force -EA 0|
  ForEach-Object {
    get-shortcut $_.FullName|where Hotkey
  }

이 샘플 출력에서는 제가 몰랐던 Acronis 단축키가 드러났습니다.

> .\Enum-ShortcutHotkeys.ps1

WorkingDirectory : C:\Program Files (x86)\Acronis\TrueImageHome\
Link             : Acronis System Report.lnk
TargetPath       : C:\Program Files (x86)\Acronis\TrueImageHome\SystemReport.exe
WindowStyle      : 1
Description      : Ermöglicht Ihnen, Informationen über Ihr System zu sammeln.
IconLocation     : ,1
Hotkey           : Ctrl+F7
Target           : SystemReport.exe
Arguments        :
LinkPath         : C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Acronis\True Image\Extras und
                   Werkzeuge\Acronis System Report.lnk

WorkingDirectory : C:\Program Files (x86)\Acronis\TrueImageHome\
Link             : Acronis System Report.lnk
TargetPath       : C:\Program Files (x86)\Acronis\TrueImageHome\SystemReport.exe
WindowStyle      : 1
Description      : Ermöglicht Ihnen, Informationen über Ihr System zu sammeln.
IconLocation     : ,1
Hotkey           : Ctrl+F7
Target           : SystemReport.exe
Arguments        :
LinkPath         : C:\Users\All Users\Microsoft\Windows\Start Menu\Programs\Acronis\True Image\Extras und
                   Werkzeuge\Acronis System Report.lnk

관련 정보