Summary: In a corporate environment you often want to install or uninstall software silently, with no input from the user.
Current versions (Inno Setup installers):
In early 2020, we switched to using Inno Setup instead of InstallShield. Instructions on how to automate Inno Setup installers can be found here:
The Inno Setup uninstaller is usually here:
C:\Program Files\GPSoftware\Directory Opus\unins000.exe
If you are installing an older version which uses InstallShield, please see the first reply to this post, below, for details on how that worked.
Automatically installing a registration certificate (All installer types):
After the main program installation is done, you still need to install the registration certificate, so that Opus is not running in time-limited evaluation mode. This can be automated using the /cert
and /regcode
arguments to dopus.exe (the main Directory Opus executable):
"C:\Program Files\GPSoftware\Directory Opus\dopus.exe" /cert <cert filename> /regcode <registration code> /norun
The <cert filename> must be the full filename of the certificate text file (a text file containing your program certificate, including the ---BEGIN and ---END lines). If this filename contains spaces, make sure you enclose it in quotation marks.
The certificate must also be a purchased one. Free evaluation certificates will not work with silent installs.
The <registration code> is a sequence of letters and numbers which you can find at the top of the certificate file.
The /norun
argument in the example prevents Opus from starting once the certificate has been installed; you can remove the /norun argument if you want Opus to start as part of the install.
Note: This command only works if dopus.exe is not already running. If the command causes an Opus window to open instead, check that dopus.exe isn't already running in the background (e.g. from previous testing of your install script) and exit it if it is.
Example:
"C:\Program Files\GPSoftware\Directory Opus\dopus.exe" /cert "dopus_cert.txt" /regcode AAAAA-BBBBB-CCCCC-DDDD /norun
(The reg-code in that command is one character shorter than a real one. This is because the forum is configured to censor anything which looks like a real reg-code, to stop people pasting theirs in public messages.)
Automatically importing a configuration (All installer types):
If you also wish to import an Opus configuration as part of your install script then you can easily do so in one of two ways.
Config import via manual file copy:
The Opus preferences, toolbars, etc. are all stored in files to make it easy for you to copy them.
See the separate FAQs on Opus configuration files: Basic Details and Advanced Details.
Config import via Backup & Restore:
You can also have Opus automatically import a configuration file that you create using the Preferences / Backup & Restore command.
To do this, make your install batch file start Opus with the /config
argument on the command line. For example:
"C:\Program Files\GPSoftware\Directory Opus\dopus.exe" /config "c:\temp\opus config.ocb"
You can also prevent the "New User" dialog from appearing the first time the user runs Opus, by setting a registry value using the following command:
reg add "HKCU\Software\GPSoftware\Directory Opus" /f /v ConfigType /t REG_SZ /d "private"