How to Exit Directory Opus

Frequently asked questions.
User avatar
leo
GPSoftware
Posts: 36427
Joined: 07 Nov 2004, 01:30
OS: Windows 10 64-bit
Opus: Directory Opus 12
Location: London, UK
Contact:

How to Exit Directory Opus

Postby leo » 02 May 2007, 14:17

By default, Opus stays running in the background even when none of its windows are open. This is for a few reasons:

  • It means you can very quickly open new Opus windows which is useful if you frequently open windows to do a job and then close them when done.
  • It means System-Wide Hotkeys still work when no windows are open.
  • It means Floating/Docked Toolbars work when no windows are open.

To exit Opus temporarily you can use:

  • The File menu:
    exit_opus_filemenu.png
    exit_opus_filemenu.png (20.24 KiB) Viewed 3898 times

  • The jump-list (Windows 7):

    exit_opus_jumplist.png
    exit_opus_jumplist.png (30.72 KiB) Viewed 9294 times

  • The tray icon (if enabled):

    exit_opus_trayicon.png
    exit_opus_trayicon.png (56.38 KiB) Viewed 9294 times

If you want Opus to exit automatically when no windows are open (i.e. you don't care about system-wide hotkeys, floating toolbars etc.), turn on this option:
exit_opus_prefs.png
exit_opus_prefs.png (63.39 KiB) Viewed 9294 times

User avatar
leo
GPSoftware
Posts: 36427
Joined: 07 Nov 2004, 01:30
OS: Windows 10 64-bit
Opus: Directory Opus 12
Location: London, UK
Contact:
If you want to exit Opus from a batch file or script, there are commands to do that.

Do not simply kill the DOpus.exe and DOpusRT.exe processes. There is no need to and it risks corrupting your config data. Instead, use the commands below, or the menu items shown above, to cleanly exit Opus.

  • Exiting and restarting Opus from another program or installer:

    Opus supports the Restart Manager API, so programs and installers should use that if they need to stop and start Opus programmatically, the same as they would for Windows Explorer.


  • Cleanly exiting Opus from a batch or script:

    The RestartViaManager command-line tool can be used to shutdown and immediately restart DOpus.exe (but not DOpusRT.exe) via the Restart Manager API, if that is all you need to do. The tool runs synchronously so you will know Opus has finished restarting when the tool completes (unless there was an error).

    For more complex needs, read on.

    If DOpusRT.exe is running to provide desktop double-click functionality, tell it to exit with this command:

    • "C:\Program Files\GPSoftware\Directory Opus\DOpusRT.exe" /dblclk=off

    (Note that launching Opus itself will also launch DOpusRT.exe if needed, so there is not normally any need to re-launch DOpusRT.exe manually.)


    To exit DOpus.exe itself, run the Close PROGRAM command via DOpusRT.exe (this is not a typo; you use DOpusRT.exe to send the command, not DOpus.exe):

    • "C:\Program Files\GPSoftware\Directory Opus\DOpusRT.exe" /CMD Close PROGRAM

    Note that the commands above run asynchronously. They dispatch requests to Opus and then exit without waiting for the requests to complete. If you need to wait until Opus has completely stopped running then you will need some additional logic. Here is one way to do it in VBScript:


  • Restarting Opus from a batch or script:

    If your script is running from an elevated context (UAC), you should restart Opus using DOpusRT.exe's /runopus argument, which ensures Opus does not run elevated:

    • "C:\Program Files\GPSoftware\Directory Opus\DOpusRT.exe" /runopus

    Otherwise, how you choose to restart Opus depends on which windows (if any) you want to (re-)appear. If you run DOpus.exe with no arguments then a window will always appear, even if Preferences specifies that nothing should at startup. To suppress that behaviour, run DOpus.exe with the noautolister argument:

    • "C:\Program Files\GPSoftware\Directory Opus\DOpus.exe" noautolister

Full information about the command-line arguments is in the manual.

Info about the different Opus EXE files is here.


Return to “Directory Opus FAQs”