none
How do I get the cmd window to close after running batch file? RRS feed

  • Question

  • I'm trying to get the command window to close after running the following (which opens onenote to a specific page):

    "C:\Program Files\Microsoft Office\root\Office16\ONENOTE.EXE" /hyperlink "onenote:https://dimensiondata-my.sharepoint.com/personal/john_stimmer_dimensiondata_com/Documents/DD%20Notes/Quick%20Notes.one#Personal%20Handoff%20(Daily)&section-id={XXXXXX}&page-id={XXXXXX}&end"

    I tried this but it doesn't work:

    start"" "C:\Program Files\Microsoft Office\root\Office16\ONENOTE.EXE" /hyperlink "onenote:https://dimensiondata-my.sharepoint.com/personal/john_stimmer_dimensiondata_com/Documents/DD%20Notes/Quick%20Notes.one#Personal%20Handoff%20(Daily)&section-id={XXXXXX}&page-id={XXXXXX}&end"

    exit

    Any answers are appreciated

    Friday, May 26, 2017 1:45 AM

Answers

  • Use this (all one line):


    start "" "C:\Program Files\Microsoft Office\root\Office16\ONENOTE.EXE" /hyperlink "onenote:https://dimensiondata-my.sharepoint.com/personal/john_stimmer_dimensiondata_com/Documents/DD%20Notes/Quick%20Notes.one#Personal%20Handoff%20(Daily)&section-id={XXXXXX}&page-id={XXXXXX}&end"
    


    -- Bill Stewart [Bill_Stewart]


    Friday, May 26, 2017 3:05 AM
    Moderator