#1 21 Mar 2019 18:39

sjf2
Member
Registered: 06 Jan 2019
Posts: 2

Access to Windows SHELL: shortcuts from a Hyperlink

I am just trying to create a word doc that contains a list of the Windows SHELL: shortcuts (eg: shell:profile) with hyperlinks to execute the shortcut that is clicked on (eg: exeplorer.exe shell:profile).  After a bunch of surfing, it appears that this is a security risk and is therefore not allowed.  I did find a post that detailed the creation of a custom URL Protocol like this:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\RunExp]
@="URL:RunExp Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\RunExp\shell]

[HKEY_CLASSES_ROOT\RunExp\shell\open]

[HKEY_CLASSES_ROOT\RunExp\shell\open\command]
@="explorer.exe"

If this worked, it would not be a good solution as it would not be portable.  However, I did try it in a Hyperlink: RunExp://shell:profile which does start explorer.exe when the link is clicked but it does not seem to do anything with the "shell:profile" target.

Does anyone know how to make the URL Protocol in a Hyperlink work or, better yet, have a good solution for what I am trying to accomplish?

Offline

#2 22 Mar 2019 12:09

Simon Sheppard
Super Administrator
Registered: 27 Aug 2005
Posts: 1,019
Website

Re: Access to Windows SHELL: shortcuts from a Hyperlink

Some options for creating shortcuts for these are described at the bottom of this page
https://ss64.com/nt/shell.html

To run shortcuts within Microsoft Office I think you will need to write a short macro which calls an external batch file, then you can lower the security settings for macros to allow it to run.
Once you have a macro working it can be attached to a button or whatever within Word.

Offline

Board footer

Powered by FluxBB