3

According to this post, Command Prompt takes the following command and will open a "Run window"

  • explorer.exe Shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}
  • The "Run window":

    enter image description here

How to further pass a command to the "Run window"? I would like to run a local link for OneNote, as seen in this post.


In particular, for links as below (taken from the example post), it executes well in the "Run window", but cannot be executed properly through Command Prompt.

onenote:https://d.docs.live.net/dc516d79ac0/OneNote/@Home/General.one#Verizon%20Bill%20Figures&section-id={4DEE-95E4}&page-id={003E-4B84}&object-id={0DCF-1D9C}&15

I think I am missing some simple commands that are available either through Command Prompt or Power Shell. I prefer Command Prompt argument/solution as Gvim on Windows runs things through Command Prompt by default.


PS: start command for Command Prompt does not open the onenote:https://d.docs.live.... link properly. I set the default app for onenote: links as the newer OneNote app. While passing the full link to the "Run window" opens the desired page in OneNote, prefixing the link with onenote: and passing to Command Prompt only opened the OneNote app but does not jump to the desired page.


At the end of the day, I am drafting some Vim script to recognize onenote: links and open them through the Vimwiki plug-in. Will be reporting the full solution in this thread on Github.

3
  • Why must you use the run box? I'm pretty sure you can do the exact same things with a cmd shell.
    – Ecstasy
    Feb 3, 2020 at 15:49
  • 2
    Type start /?. Start "" "onenote:https://d.docs.live.net/dc516d79ac0/OneNote/@Home/General.one#Verizon%20Bill%20Figures&section-id={4DEE-95E4}&page-id={003E-4B84}&object-id={0DCF-1D9C}&15"
    – Mark
    Feb 3, 2020 at 16:18
  • Thanks a lot! start "" "onenote:https://d.docs.live.net/..... works in Command Prompt! I ended up implementing the exact argument in Vim, in this post.
    – llinfeng
    Feb 3, 2020 at 21:30

2 Answers 2

2

Thanks to @Mark, one can put whatever that is "runnable" in the "Run window" into Command Prompt, following syntax: start "" "SOMETHING".

1

You could do this in powershell. Its a one-liner using the start-process method:

start-process onenote:"https://d.docs.live.net/dc516d79ac0/OneNote/@Home/General.one#Verizon%20Bill %20Figures&section-id={4DEE-95E4}&page-id={003E-4B84}&object-id={0DCF-1D9C}&15"

just copy and paste this into a text file, give it a name and the extension .ps1 and run it.

1
  • Thanks a lot! Per my use-case, things runnable through Command Prompt is preferred. I noticed that to execute the onenote:https:// link in Powershell, as you suggested, the link needs to be tweaked carefully. Thank you anyways :)
    – llinfeng
    Feb 3, 2020 at 21:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .