How to Exit Directory Opus

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.

If you want to do a clean shutdown/restart of Directory Opus then you need to exit the program explicitly, and not just close the current Lister window.

To fully exit Opus, you can use:

  • The File menu:

  • The jump-list (Windows 7):

  • The tray icon (if enabled):

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:

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 File 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: (750 Bytes)

  • 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.