Summary: In a corporate environment you often want to install software silently, with no input from the user.
Directory Opus uses the standard InstallShield system which supports silent installation via an 'answer file'.
As InstallShield itself has changed slightly over the years, the details of how to do a silent install differ slightly depending on Opus version.
Directory Opus 9, 10, 11, 12 (and above):
- Download the installer and extract its contents to a folder (called OpusInstall in this example) using the /extract_all argument:
- Within the folder you extracted to, under a Disk1 sub-folder, you'll find setup.exe and various data files. To generate a "response file" (aka "answer file") you need to run this extracted setup.exe (and not the original downloaded installer) with the -r argument:
When you run that it will look like the normal installer, and Opus will be installed on the machine you are using. The difference is that the responses you give to the installer's questions will be saved into the 'answer file' which can then be used to supply the same answers during silent installs.
The "response file" will be written to C:\Windows\setup.iss (or wherever your Windows folder is) by default. After creating the response file you should copy it to the same place as the extracted setup files from the first step.
- With the response file in the same folder you can run the extracted setup.exe with the -s argument to perform silent installs:
- 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 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 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.
- In summary, once the response file (setup.iss) has been created, the automated install of Directory Opus would probably be a script file which runs the following commands:
"C:\Program Files\GPSoftware\Directory Opus\dopus.exe" /cert "dopus_cert.txt" /regcode ■■■■■■■■■■■■■■■■■■■■■■■ /norun
- If you also wish to import an Opus configuration as part of your install script then you can easily do so. 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 / Advanced Details.
Please note: Directory Opus 11.13 and later cannot be silent-installed over the top of Opus 11.12 or earlier, without first uninstalling the older version.
This is due to a new installer architecture introduced in Opus 11.13, to move from separate 32-bit and 64-bit installers to a single unified installer.
Once 11.13 or above is installed, updating to later versions should work as before, so this is just a one-off due to the installer change. (Tested with the 11.13 to 11.13.1 update, at time of writing.)
Remember to re-make your setup.iss files with the new installer.
This works in almost the same way as the silent install, except you add the /uninst argument when running the extracted setup.exe.
You should do this with the same installer version you wish to uninstall, if possible. (If you need historic installer binaries, please ask on the forum.)
- If you've already set up silent installs then you already have the extracted installer files. If not, extract them as per the instructions above (DOpusInstall.exe /extract_all:"OpusInstall" etc.).
- With Opus installed on your machine, run the extracted unistaller interactively, to generate a response file.
Note: You may want to make sure Opus is running when you do this, so the files are in-use, causing the uninstaller to prompt for a reboot and record your yes/no answer as part of the response file. That will be closer to the typical situation on a user's machine.
setup.exe -r /uninst
- The response file will be saved to C:\Windows\setup.iss by default (the same as it was for the install case).
Move the response file so it is next to your setup.exe. (If you want to keep just a single copy of the extracted installer binaries, you could do that and store the two response files separately, moving the one you want in as needed.)
- With the response file in place, you can now do a silent uninstall:
setup.exe -s /uninst
- The uninstall should not be considered complete until the machine has rebooted, unless you can ensure it is done when no user is logged into the machine interactively.
- Note: Doing an uninstall will wipe the configuration data of the user who runs it (and possibly all users on the machine if run by an admin with access to their profiles). Be sure to backup configurations first if you intend the uninstall to be temporary rather than forever.
Directory Opus 8 (and below):
Steps are similar to those for Opus 9, above, except that:
- Older installers may use /r and /s instead of -r and -s to generate and use the answer file.
- Very old Opus installers did not need to be extracted and the /r and /s arguments could be applied directly to the downloaded setup.exe.
- If you have an installer that requires extraction, but find that the /extract_all argument does not work, you should be able to use a tool such as 7-zip or WinRar to extract the contents of the InstallShield exe. Ensure that there is actually a setup.exe in the resultant directory as not all extraction tools will extract the data correctly.
Automatically importing a configuration:
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"