Sorry for the bad advice.
I've spent a while looking at this and I can't find a good way to silently install both the program and the OCB backup, at least not without at least one window popping up as part of the process. (At least without running into things which may fail if the operations run too fast or slow, which we definitely want to avoid.)
We may look into providing a way to do this using an OCB backup in a future version.
For now, I'd recommend doing the silent install as you already are, and then copying the config files over manually, instead of using the OCB backup.
The files you'll want to copy will be in two places in the user's profile:
- %APPDATA%\GPSoftware\Directory Opus
- %LOCALAPPDATA%\GPSoftware\Directory Opus
If you have Opus already running on a machine with the desired config, you can grab the two folders from there. Otherwise, restoring the config backup (.ocb file) manually will get you the files, which you can then copy into your install folder and copy manually at the end of the batch file or script.
You'll still need to run the "/cert ... /norun" line you've already got, to installs the certificate, but after that you don't need to run Opus at all. With the config files in place, Opus will be ready for when the user wants to launch it.
However, if you do wish to launch Opus so it is running in the background at the end of the script, use dopus.exe NOAUTOLISTER STARTUP as that tells Opus to run as if it was launched during Windows startup. Whether that then opens any windows will depend on what Opus is configured to do in Preferences / Launching Opus / Startup.
If you don't want Opus itself running in the background, but do want the Desktop Double-Click feature to be able to launch it for the user (by double-clicking the background of the Windows desktop), run this at the end of the script:
"C:\Program Files\GPSoftware\Directory Opus\dopusRT.exe" /dblclk
While I'm here, some of the config files are worth mentioning in particular:
- %APPDATA%\GPSoftware\Directory Opus\userdata.omd
If this file is missing, the first-run wizard will be shown. So at a minimum, you'll want to copy that file over to prevent the wizard appearing the first time Opus is launched.
Here's an example of the file, although aside from the config_type="private" part, which tells Opus to look for the config files in the normal places, the rest should not matter too much:
<?xml version="1.0" ?>
<opus_meta_data config_type="private" lastfeed_high="30383342" lastfeed_low="1966816768" jump_list="983793" last_version_low="65536" last_version_high="720901" />
- %APPDATA%\GPSoftware\Directory Opus\Config Files\userprefs.oxc
This file contains the Preferences / Miscellaneous / Advanced settings, but only those which have been changed from their default values. One you may want to change is show_release_history. Set it to False to prevent the help file / release notes appearing the first time Opus is run, if the config was created with an older version.
(Edit, Jan 2019: In 12.13 and later versions, the setting is called display_release_history and is off by default.)
You can set it using the Preferences UI, but if it's easier to manually edit/create the file, here's a minimal version which just changes that setting:
<?xml version="1.0" encoding="UTF-8"?>
<userprefs>
<show_release_history>no</show_release_history>
</userprefs>
(Edit, Jan 2019: In 12.13 and later versions, the setting is renamed, as mentioned above, but you can skip this entirely as it's also off by default.)
If the config already has that file, you might want to add the setting to it rather than overwrite the whole file. It might look something like this (from my personal version, where I've changed quite a few settings from their defaults; obviously you do not want to copy this exactly and it is just an example);
<?xml version="1.0" encoding="UTF-8"?>
<userprefs>
<open_container_in_tabs>yes</open_container_in_tabs>
<layout_string>%1</layout_string>
<button_editor_advanced>yes</button_editor_advanced>
<max_md5_file_size>0xc350</max_md5_file_size>
<win7_show_sharing_overlays>no</win7_show_sharing_overlays>
<image_res_units>1</image_res_units>
<image_size_units>2</image_size_units>
<copy_nonbufferio_threshold>1 MB</copy_nonbufferio_threshold>
<clipboard_image_paste>2</clipboard_image_paste>
<show_release_history>no</show_release_history>
<resize_grips>yes</resize_grips>
</userprefs>
- %LOCALAPPDATA%\GPSoftware\Directory Opus\State Data\confirm.osd
This remembers dialogs you've asked Opus not to display again. The one that interests us is the splash screen, which will appear if you run Opus without any listers opening. Chances are that your configuration will already include this setting, but if you ever need to create it manually, a minimal version of the file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<confirm>
<show_splash_screen ask="no" />
</confirm>