Find originator of a hotkey
How do I find the source of a Windows hotkey / shortcut? I know the keys that start it are Ctrl-Alt-M and I know the program it runs is Windows explorer pointed to the My Documents folder. But how do I find the location of the originator?
I want to find the "source" and remove the hotkey from it so that I can create another one.
We're on fairly secured machines and I won't be able to download any software so I need something native to windows to solve the problem.
I'm on Windows 7 64-bit if that matters.
windows shortcuts hotkeys
add a comment |
How do I find the source of a Windows hotkey / shortcut? I know the keys that start it are Ctrl-Alt-M and I know the program it runs is Windows explorer pointed to the My Documents folder. But how do I find the location of the originator?
I want to find the "source" and remove the hotkey from it so that I can create another one.
We're on fairly secured machines and I won't be able to download any software so I need something native to windows to solve the problem.
I'm on Windows 7 64-bit if that matters.
windows shortcuts hotkeys
I don't think there is a native solution. Relevant: Find out what process registered a global hotkey? (Windows API) and How do I get the list of defined shortcut keys in the Start menu?
– DavidPostill♦
Mar 20 '17 at 13:21
add a comment |
How do I find the source of a Windows hotkey / shortcut? I know the keys that start it are Ctrl-Alt-M and I know the program it runs is Windows explorer pointed to the My Documents folder. But how do I find the location of the originator?
I want to find the "source" and remove the hotkey from it so that I can create another one.
We're on fairly secured machines and I won't be able to download any software so I need something native to windows to solve the problem.
I'm on Windows 7 64-bit if that matters.
windows shortcuts hotkeys
How do I find the source of a Windows hotkey / shortcut? I know the keys that start it are Ctrl-Alt-M and I know the program it runs is Windows explorer pointed to the My Documents folder. But how do I find the location of the originator?
I want to find the "source" and remove the hotkey from it so that I can create another one.
We're on fairly secured machines and I won't be able to download any software so I need something native to windows to solve the problem.
I'm on Windows 7 64-bit if that matters.
windows shortcuts hotkeys
windows shortcuts hotkeys
edited Dec 17 '18 at 18:49
Twisty Impersonator
18k146596
18k146596
asked Mar 20 '17 at 13:12
user563991user563991
61
61
I don't think there is a native solution. Relevant: Find out what process registered a global hotkey? (Windows API) and How do I get the list of defined shortcut keys in the Start menu?
– DavidPostill♦
Mar 20 '17 at 13:21
add a comment |
I don't think there is a native solution. Relevant: Find out what process registered a global hotkey? (Windows API) and How do I get the list of defined shortcut keys in the Start menu?
– DavidPostill♦
Mar 20 '17 at 13:21
I don't think there is a native solution. Relevant: Find out what process registered a global hotkey? (Windows API) and How do I get the list of defined shortcut keys in the Start menu?
– DavidPostill♦
Mar 20 '17 at 13:21
I don't think there is a native solution. Relevant: Find out what process registered a global hotkey? (Windows API) and How do I get the list of defined shortcut keys in the Start menu?
– DavidPostill♦
Mar 20 '17 at 13:21
add a comment |
1 Answer
1
active
oldest
votes
There is a wmi query in vbs that enumerates all .lnk shortcut files, but it doesn't expose the hotkey property.
The wscript.shell comobject does.
I prefer PowerShell, the following script uses a function found on stackoverflow.com.
It recurses the whole c-drive to find .lnk files and checks if it contains a Hotkey
## 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
}
This sample output revealed an Acronis hotkey I didn't know off.
> .Enum-ShortcutHotkeys.ps1
WorkingDirectory : C:Program Files (x86)AcronisTrueImageHome
Link : Acronis System Report.lnk
TargetPath : C:Program Files (x86)AcronisTrueImageHomeSystemReport.exe
WindowStyle : 1
Description : Ermöglicht Ihnen, Informationen über Ihr System zu sammeln.
IconLocation : ,1
Hotkey : Ctrl+F7
Target : SystemReport.exe
Arguments :
LinkPath : C:ProgramDataMicrosoftWindowsStart MenuProgramsAcronisTrue ImageExtras und
WerkzeugeAcronis System Report.lnk
WorkingDirectory : C:Program Files (x86)AcronisTrueImageHome
Link : Acronis System Report.lnk
TargetPath : C:Program Files (x86)AcronisTrueImageHomeSystemReport.exe
WindowStyle : 1
Description : Ermöglicht Ihnen, Informationen über Ihr System zu sammeln.
IconLocation : ,1
Hotkey : Ctrl+F7
Target : SystemReport.exe
Arguments :
LinkPath : C:UsersAll UsersMicrosoftWindowsStart MenuProgramsAcronisTrue ImageExtras und
WerkzeugeAcronis System Report.lnk
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1190487%2ffind-originator-of-a-hotkey%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
There is a wmi query in vbs that enumerates all .lnk shortcut files, but it doesn't expose the hotkey property.
The wscript.shell comobject does.
I prefer PowerShell, the following script uses a function found on stackoverflow.com.
It recurses the whole c-drive to find .lnk files and checks if it contains a Hotkey
## 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
}
This sample output revealed an Acronis hotkey I didn't know off.
> .Enum-ShortcutHotkeys.ps1
WorkingDirectory : C:Program Files (x86)AcronisTrueImageHome
Link : Acronis System Report.lnk
TargetPath : C:Program Files (x86)AcronisTrueImageHomeSystemReport.exe
WindowStyle : 1
Description : Ermöglicht Ihnen, Informationen über Ihr System zu sammeln.
IconLocation : ,1
Hotkey : Ctrl+F7
Target : SystemReport.exe
Arguments :
LinkPath : C:ProgramDataMicrosoftWindowsStart MenuProgramsAcronisTrue ImageExtras und
WerkzeugeAcronis System Report.lnk
WorkingDirectory : C:Program Files (x86)AcronisTrueImageHome
Link : Acronis System Report.lnk
TargetPath : C:Program Files (x86)AcronisTrueImageHomeSystemReport.exe
WindowStyle : 1
Description : Ermöglicht Ihnen, Informationen über Ihr System zu sammeln.
IconLocation : ,1
Hotkey : Ctrl+F7
Target : SystemReport.exe
Arguments :
LinkPath : C:UsersAll UsersMicrosoftWindowsStart MenuProgramsAcronisTrue ImageExtras und
WerkzeugeAcronis System Report.lnk
add a comment |
There is a wmi query in vbs that enumerates all .lnk shortcut files, but it doesn't expose the hotkey property.
The wscript.shell comobject does.
I prefer PowerShell, the following script uses a function found on stackoverflow.com.
It recurses the whole c-drive to find .lnk files and checks if it contains a Hotkey
## 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
}
This sample output revealed an Acronis hotkey I didn't know off.
> .Enum-ShortcutHotkeys.ps1
WorkingDirectory : C:Program Files (x86)AcronisTrueImageHome
Link : Acronis System Report.lnk
TargetPath : C:Program Files (x86)AcronisTrueImageHomeSystemReport.exe
WindowStyle : 1
Description : Ermöglicht Ihnen, Informationen über Ihr System zu sammeln.
IconLocation : ,1
Hotkey : Ctrl+F7
Target : SystemReport.exe
Arguments :
LinkPath : C:ProgramDataMicrosoftWindowsStart MenuProgramsAcronisTrue ImageExtras und
WerkzeugeAcronis System Report.lnk
WorkingDirectory : C:Program Files (x86)AcronisTrueImageHome
Link : Acronis System Report.lnk
TargetPath : C:Program Files (x86)AcronisTrueImageHomeSystemReport.exe
WindowStyle : 1
Description : Ermöglicht Ihnen, Informationen über Ihr System zu sammeln.
IconLocation : ,1
Hotkey : Ctrl+F7
Target : SystemReport.exe
Arguments :
LinkPath : C:UsersAll UsersMicrosoftWindowsStart MenuProgramsAcronisTrue ImageExtras und
WerkzeugeAcronis System Report.lnk
add a comment |
There is a wmi query in vbs that enumerates all .lnk shortcut files, but it doesn't expose the hotkey property.
The wscript.shell comobject does.
I prefer PowerShell, the following script uses a function found on stackoverflow.com.
It recurses the whole c-drive to find .lnk files and checks if it contains a Hotkey
## 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
}
This sample output revealed an Acronis hotkey I didn't know off.
> .Enum-ShortcutHotkeys.ps1
WorkingDirectory : C:Program Files (x86)AcronisTrueImageHome
Link : Acronis System Report.lnk
TargetPath : C:Program Files (x86)AcronisTrueImageHomeSystemReport.exe
WindowStyle : 1
Description : Ermöglicht Ihnen, Informationen über Ihr System zu sammeln.
IconLocation : ,1
Hotkey : Ctrl+F7
Target : SystemReport.exe
Arguments :
LinkPath : C:ProgramDataMicrosoftWindowsStart MenuProgramsAcronisTrue ImageExtras und
WerkzeugeAcronis System Report.lnk
WorkingDirectory : C:Program Files (x86)AcronisTrueImageHome
Link : Acronis System Report.lnk
TargetPath : C:Program Files (x86)AcronisTrueImageHomeSystemReport.exe
WindowStyle : 1
Description : Ermöglicht Ihnen, Informationen über Ihr System zu sammeln.
IconLocation : ,1
Hotkey : Ctrl+F7
Target : SystemReport.exe
Arguments :
LinkPath : C:UsersAll UsersMicrosoftWindowsStart MenuProgramsAcronisTrue ImageExtras und
WerkzeugeAcronis System Report.lnk
There is a wmi query in vbs that enumerates all .lnk shortcut files, but it doesn't expose the hotkey property.
The wscript.shell comobject does.
I prefer PowerShell, the following script uses a function found on stackoverflow.com.
It recurses the whole c-drive to find .lnk files and checks if it contains a Hotkey
## 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
}
This sample output revealed an Acronis hotkey I didn't know off.
> .Enum-ShortcutHotkeys.ps1
WorkingDirectory : C:Program Files (x86)AcronisTrueImageHome
Link : Acronis System Report.lnk
TargetPath : C:Program Files (x86)AcronisTrueImageHomeSystemReport.exe
WindowStyle : 1
Description : Ermöglicht Ihnen, Informationen über Ihr System zu sammeln.
IconLocation : ,1
Hotkey : Ctrl+F7
Target : SystemReport.exe
Arguments :
LinkPath : C:ProgramDataMicrosoftWindowsStart MenuProgramsAcronisTrue ImageExtras und
WerkzeugeAcronis System Report.lnk
WorkingDirectory : C:Program Files (x86)AcronisTrueImageHome
Link : Acronis System Report.lnk
TargetPath : C:Program Files (x86)AcronisTrueImageHomeSystemReport.exe
WindowStyle : 1
Description : Ermöglicht Ihnen, Informationen über Ihr System zu sammeln.
IconLocation : ,1
Hotkey : Ctrl+F7
Target : SystemReport.exe
Arguments :
LinkPath : C:UsersAll UsersMicrosoftWindowsStart MenuProgramsAcronisTrue ImageExtras und
WerkzeugeAcronis System Report.lnk
edited May 23 '17 at 12:41
Community♦
1
1
answered Mar 20 '17 at 16:18
LotPingsLotPings
4,7311722
4,7311722
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1190487%2ffind-originator-of-a-hotkey%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I don't think there is a native solution. Relevant: Find out what process registered a global hotkey? (Windows API) and How do I get the list of defined shortcut keys in the Start menu?
– DavidPostill♦
Mar 20 '17 at 13:21