Summary: In a corporate environment you often want to install or uninstall software silently, with no input from the user.
Current versions (InnoSetup installers):
In early 2020, we switched to using InnoSetup instead of InstallShield. Instructions on how to automate InnoSetup installers can be found here:
Only the installers marked for Windows XP users still use InstallShield. If you are using those, or installing an older version, please see the first reply to this post, below.
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
/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 <registration code> is a sequence of letters and numbers which you can find at the top of the certificate file.
/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.
"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.
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"