Silent install AND apply a backup at the same time?

Can a backup be applied (i.e., a restore performed) during a silent install? A script to perform a restore to follow the silent install would work just fine also.

Assuming the default per-user configuration mode, it should work to restore a normal file backup of the main Opus profile folder before doing the silent install:

C:\Users<username>\AppData\Roaming\GPSoftware\Directory Opus

It should also work if using the shared configuration mode, as long as it is done before the install rather than after (so that the installer and licence installation parts can update the shared config folder if needed).

Shared config would be here:

C:\ProgramData\GPSoftware\Directory Opus

Just for completeness, there's also a non-roaming folder which only stores things like window positions and caches, which would not normally be worth backing up or restoring:

C:\Users<username>\AppData\Local\GPSoftware\Directory Opus

"Opus stores its Preferences settings on disk, so backing up your Preferences can be as simple as making a copy of the files / folders in question. However Opus includes an integrated Backup tool that automates this process for you, and results in a single backup file that can be used to restore your Preferences in the event that Opus ever has to be reinstalled. If you ever install Opus on a new computer you can also use this to move your configuration across."

I was wanting to do a restore (silently) from a Windows script using DOpusBackup.ocb, after doing the silent install. Basically, the same thing as one can do from the Backup and Restore Configuration dialog, but from outside of the program.

[Update: See reply below for what is probably a better way.]

I'm not sure how well it will work with a fully silent install, but automate restoring of backup .ocb files can be done by running the internal Prefs RESTORE... command via dopusrt.exe.

Something like this, if you're restoring OpusConfigToRestore.ocb:

"C:\Path\To\dopusrt.exe" /acmd Prefs QUIET RESTORE=replace,all FROM="C:\OpusConfigs\OpusConfigToRestore.ocb"

However, from doing some quick tests on this, it looks like it only works if Opus is already running, so it may not be ideal for silent installs. Doing a file backup/restore of the config folder may still be the best approach for silent installs.

For what it's worth, the .ocb backup files are really just zip files, but they have folders merged from the three configuration areas and in some cases need a bit of processing done to the filenames (if using custom background images, from memory), so they can't be unzipped directly but could be another way to do things if you're stuck. I'd have to look into things in detail to get a full list of any special processing that needs doing beyond simply extracting the zip and moving particular folders to particular places, but I would not expect there to be much more than that.

I've been reminded of a better way, using dopus.exe not dopusrt.exe:

"C:\Path\To\DOpus.exe" /config "C:\OpusConfigs\OpusConfigToRestore.ocb"

Note that Opus will remain running after restoring the backup, so you may wish to script it as a first-run action rather than during install, if they are separate stages in your process.

[quote="leo"]I've been reminded of a better way, using dopus.exe not dopusrt.exe:

"C:\Path\To\DOpus.exe" /config "C:\OpusConfigs\OpusConfigToRestore.ocb"

Note that Opus will remain running after restoring the backup, so you may wish to script it as a first-run action rather than during install, if they are separate stages in your process.[/quote]

I used '/norun' on the above command line and DOpus did not run. :slight_smile: I started it, then, manually and it ran fine, with all my settings.

After silent uninstalling, when I right-click on the Windows 10 "start button" and choose either "Programs and Features" or "Power Options", I get an error box (I don't recall, but some kind of application not found error perhaps... next time I uninstall, I'll update this detail). When I go to control panel and select either of those two things, they work fine. If I silent install DOpus, then, the error does not occur, and things work as they should. So, silent uninstalling DOpus affects my Windows installation, and silent installing it after uninstalling it makes the problem go away.

Other related questions, suggestions, notes:

After the silent install, certificate install, backup applied, is a reboot required (it seems to work fine immediately)?
Why does DOpus require reboot on install/uninstall?
Uninstall (silent) does not terminate DOpus currently running.
Are the setup.iss files valid across DOpus minor versions?
Suggestion: Allow silent install/uninstall config file to be specified on the command line rather than only recognizing setup.iss.

A reboot is required if any shell extension or keyboard hook (for system-wide hotkeys etc.) DLLs were replaced or removed. There is no way to replace or remove them in Windows except to reboot the system, due to design flaws in Windows itself.

You can check the PendingFileRenameOperations (and PendingFileRenameOperations2) for paths involving the Opus program directory to programatically detect if a reboot is needed.

Does the start menu issue only happen until you reboot, or is it still a problem after a reboot?

[quote="leo"]A reboot is required if any shell extension or keyboard hook (for system-wide hotkeys etc.) DLLs were replaced or removed. There is no way to replace or remove them in Windows except to reboot the system, due to design flaws in Windows itself.

You can check the PendingFileRenameOperations (and PendingFileRenameOperations2) for paths involving the Opus program directory to programatically detect if a reboot is needed.[/quote]

OK.

It persists after reboot

I tried a normal uninstall (should do the same thing as a silent uninstall, I just don't have that set up) and can't reproduce the problem so far.

Is your silent uninstall setup using the current setup.exe etc. or an old one?

The registry settings in the zip for How to manually remove Explorer Replacement settings should fix things if the uninstall didn't restore the old registry settings for some reason. (Permissions, perhaps?)

Sometimes the Windows shell takes a few seconds after changing the registry before it behaves differently, as it seems to cache some of the involved settings, but after 10 seconds or so it should see the change.

[quote="leo"]I tried a normal uninstall (should do the same thing as a silent uninstall, I just don't have that set up) and can't reproduce the problem so far.

Is your silent uninstall setup using the current setup.exe etc. or an old one?[/quote]

The latest version (11.19) that I downloaded today.

[quote="leo"]The registry settings in the zip for How to manually remove Explorer Replacement settings should fix things if the uninstall didn't restore the old registry settings for some reason. (Permissions, perhaps?)

Sometimes the Windows shell takes a few seconds after changing the registry before it behaves differently, as it seems to cache some of the involved settings, but after 10 seconds or so it should see the change.[/quote]

I'm going to move to a newer build of Windows 10 after I get my software installs all automized (maybe today even if things go well), so I'll be doing the DOpus install/uninstall with that and will let you know the result.