Dear Community,
I tried to install Duplicati as a service to not use the autostart of TrayIcon anymore.
I followed the instructions for this here Other Command Line Utilities - Duplicati 2 User's Manual
- The system is Windows 10 Pro 22H2 19045.3448
- The Duplicati version was 2.0.6.1_beta_2021-05-03-x64
- I’ve two user accounts on the system. One admin user and a standard user.
I ran the command from the admin account and Duplicati was not running.
It did not work (service was not registered) and I got the following result in cmd:
C:\Program Files\Duplicati 2>Duplicati.WindowsService.exe install
Eine transaktive Installation wird ausgeführt.
Die Installationsphase wird gestartet.
Die Protokolldatei enthält den Fortschritt der Assembly C:\ProgramData\Duplicati\updates\2.0.6.3\Duplicati.WindowsService.exe.
Die Datei befindet sich in C:\ProgramData\Duplicati\updates\2.0.6.3\Duplicati.WindowsService.InstallLog.
Assembly C:\ProgramData\Duplicati\updates\2.0.6.3\Duplicati.WindowsService.exe wird installiert.
Betroffene Parameter:
logtoconsole =
assemblypath = C:\ProgramData\Duplicati\updates\2.0.6.3\Duplicati.WindowsService.exe
logfile = C:\ProgramData\Duplicati\updates\2.0.6.3\Duplicati.WindowsService.InstallLog
commandline =
Dienst Duplicati wird installiert...
Die EventLog-Quelle Duplicati im Protokoll Application wird erstellt...
Während der Installationsphase ist eine Ausnahme aufgetreten.
System.Security.SecurityException: Die Quelle wurde nicht gefunden, aber einige oder alle Ereignisprotokolle konnten nicht durchsucht werden. Protokolle, auf die kein Zugriff möglich war: Security, State.
Die Rollbackphase der Installation wird gestartet.
Die Protokolldatei enthält den Fortschritt der Assembly C:\ProgramData\Duplicati\updates\2.0.6.3\Duplicati.WindowsService.exe.
Die Datei befindet sich in C:\ProgramData\Duplicati\updates\2.0.6.3\Duplicati.WindowsService.InstallLog.
Assembly C:\ProgramData\Duplicati\updates\2.0.6.3\Duplicati.WindowsService.exe wird zurückgesetzt.
Betroffene Parameter:
logtoconsole =
assemblypath = C:\ProgramData\Duplicati\updates\2.0.6.3\Duplicati.WindowsService.exe
logfile = C:\ProgramData\Duplicati\updates\2.0.6.3\Duplicati.WindowsService.InstallLog
commandline =
Der vorherige Zustand des Ereignisprotokolls für die Quelle Duplicati wird wiederhergestellt.
Während der Rollbackphase des Installers System.Diagnostics.EventLogInstaller ist eine Ausnahme aufgetreten.
System.Security.SecurityException: Die Quelle wurde nicht gefunden, aber einige oder alle Ereignisprotokolle konnten nicht durchsucht werden. Protokolle, auf die kein Zugriff möglich war: Security, State.
Während der Rollbackphase der Installation ist eine Ausnahme aufgetreten. Diese Ausnahme wird ignoriert, und der Rollback wird fortgesetzt. Der ursprüngliche Zustand des Computers wird jedoch möglicherweise nicht vollständig wiederhergestellt, nachdem der Rollback beendet ist.
Die Rollbackphase wurde erfolgreich abgeschlossen.
Die transaktive Installation ist abgeschlossen.
Crash!
System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.InvalidOperationException: Fehler bei der Installation, und der Rollback wurde ausgeführt. ---> System.Security.SecurityException: Die Quelle wurde nicht gefunden, aber einige oder alle Ereignisprotokolle konnten nicht durchsucht werden. Protokolle, auf die kein Zugriff möglich war: Security, State.
bei System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly, Boolean wantToCreate)
bei System.Diagnostics.EventLog.SourceExists(String source, String machineName, Boolean wantToCreate)
bei System.Diagnostics.EventLogInstaller.Install(IDictionary stateSaver)
bei System.Configuration.Install.Installer.Install(IDictionary stateSaver)
bei System.ServiceProcess.ServiceInstaller.Install(IDictionary stateSaver)
bei System.Configuration.Install.Installer.Install(IDictionary stateSaver)
bei Duplicati.WindowsService.ProjectInstaller.Install(IDictionary stateSaver)
bei System.Configuration.Install.Installer.Install(IDictionary stateSaver)
bei System.Configuration.Install.AssemblyInstaller.Install(IDictionary savedState)
bei System.Configuration.Install.Installer.Install(IDictionary stateSaver)
bei System.Configuration.Install.TransactedInstaller.Install(IDictionary savedState)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.Configuration.Install.ManagedInstallerClass.InstallHelper(String[] args)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
bei System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
bei Duplicati.Library.AutoUpdater.UpdaterManager.RunMethod(MethodInfo method, String[] args)
Unbehandelte Ausnahme: System.InvalidOperationException: Fehler bei der Installation, und der Rollback wurde ausgeführt. ---> System.Security.SecurityException: Die Quelle wurde nicht gefunden, aber einige oder alle Ereignisprotokolle konnten nicht durchsucht werden. Protokolle, auf die kein Zugriff möglich war: Security, State.
bei System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly, Boolean wantToCreate)
bei System.Diagnostics.EventLog.SourceExists(String source, String machineName, Boolean wantToCreate)
bei System.Diagnostics.EventLogInstaller.Install(IDictionary stateSaver)
bei System.Configuration.Install.Installer.Install(IDictionary stateSaver)
bei System.ServiceProcess.ServiceInstaller.Install(IDictionary stateSaver)
bei System.Configuration.Install.Installer.Install(IDictionary stateSaver)
bei Duplicati.WindowsService.ProjectInstaller.Install(IDictionary stateSaver)
bei System.Configuration.Install.Installer.Install(IDictionary stateSaver)
bei System.Configuration.Install.AssemblyInstaller.Install(IDictionary savedState)
bei System.Configuration.Install.Installer.Install(IDictionary stateSaver)
bei System.Configuration.Install.TransactedInstaller.Install(IDictionary savedState)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.Configuration.Install.ManagedInstallerClass.InstallHelper(String[] args)
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei Duplicati.Library.AutoUpdater.UpdaterManager.RunMethod(MethodInfo method, String[] args)
bei Duplicati.Library.AutoUpdater.UpdaterManager.<>c__DisplayClass58_0.<RunFromMostRecentSpawn>b__0()
bei Duplicati.Library.AutoUpdater.UpdaterManager.WrapWithUpdater(AutoUpdateStrategy defaultstrategy, Action wrappedFunction)
bei Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecentSpawn(MethodInfo method, String[] cmdargs, AutoUpdateStrategy defaultstrategy)
bei Duplicati.WindowsService.Program.Main(String[] args)
I’m pretty sure the version (2.0.6.1_beta_2021-05-03-x64) I’m running was the first I installed on this system.
The file Duplicati.WindowsService.InstallLog
contains the message from the cmd.
- I returned to the user account and started Duplicati manually
- I got the message for a new version (which I ignored until now)
- I clicked install
- The progress bar for download completed two times
- Nothing happend
The log from the GUI showed the following two entries:
System.Exception: Found unexpected file: C:\ProgramData\Duplicati\updates\2.0.6.3\Duplicati.WindowsService.InstallLog
bei Duplicati.Library.AutoUpdater.UpdaterManager.VerifyUnpackedFolder(String folder, UpdateInfo version)
System.UnauthorizedAccessException: Der Zugriff auf den Pfad "C:\ProgramData\Duplicati\updates\current" wurde verweigert.
bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
bei System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
bei System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
bei System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
bei System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
bei System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
bei Duplicati.Library.AutoUpdater.UpdaterManager.DownloadAndUnpackUpdate(UpdateInfo version, Action`1 progress)
- I returned to the admin account and downloaded the current version (2.0.7.1_beta_2023-05-25) manually
- I did the installation and deactivated the automatic startup option
- I tried to register the service again
It failed again, but the path is now correct:
C:\Program Files\Duplicati 2>Duplicati.WindowsService.exe install
Eine transaktive Installation wird ausgeführt.
Die Installationsphase wird gestartet.
Die Protokolldatei enthält den Fortschritt der Assembly C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe.
Die Datei befindet sich in C:\Program Files\Duplicati 2\Duplicati.WindowsService.InstallLog.
Assembly C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe wird installiert.
Betroffene Parameter:
logtoconsole =
assemblypath = C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe
logfile = C:\Users\<username>\AppData\Local\Temp\Duplicati.WindowsService.InstallLog
commandline =
Dienst Duplicati wird installiert...
Die EventLog-Quelle Duplicati im Protokoll Application wird erstellt...
Während der Installationsphase ist eine Ausnahme aufgetreten.
System.UnauthorizedAccessException: Der Zugriff auf den Pfad "C:\Program Files\Duplicati 2\Duplicati.WindowsService.InstallState" wurde verweigert.
Die Rollbackphase der Installation wird gestartet.
Die Protokolldatei enthält den Fortschritt der Assembly C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe.
Die Datei befindet sich in C:\Program Files\Duplicati 2\Duplicati.WindowsService.InstallLog.
Assembly C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe wird zurückgesetzt.
Betroffene Parameter:
logtoconsole =
assemblypath = C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe
logfile = C:\Users\<username>\AppData\Local\Temp\Duplicati.WindowsService.InstallLog
commandline =
Während der Rollbackphase des Installers System.Configuration.Install.AssemblyInstaller ist eine Ausnahme aufgetreten.
System.IO.FileNotFoundException: Die Datei "C:\Program Files\Duplicati 2\Duplicati.WindowsService.InstallState" konnte nicht gefunden werden.
Während der Rollbackphase der Installation ist eine Ausnahme aufgetreten. Diese Ausnahme wird ignoriert, und der Rollback wird fortgesetzt. Der ursprüngliche Zustand des Computers wird jedoch möglicherweise nicht vollständig wiederhergestellt, nachdem der Rollback beendet ist.
Die Rollbackphase wurde erfolgreich abgeschlossen.
Die transaktive Installation ist abgeschlossen.
Crash!
System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.InvalidOperationException: Fehler bei der Installation, und der Rollback wurde ausgeführt. ---> System.UnauthorizedAccessException: Der Zugriff auf den Pfad "C:\Program Files\Duplicati 2\Duplicati.WindowsService.InstallState" wurde verweigert.
bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
bei System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
bei System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
bei System.IO.FileStream..ctor(String path, FileMode mode)
bei System.Configuration.Install.AssemblyInstaller.Install(IDictionary savedState)
bei System.Configuration.Install.Installer.Install(IDictionary stateSaver)
bei System.Configuration.Install.TransactedInstaller.Install(IDictionary savedState)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.Configuration.Install.ManagedInstallerClass.InstallHelper(String[] args)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
bei System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
bei Duplicati.Library.AutoUpdater.UpdaterManager.RunMethod(MethodInfo method, String[] args)
Unbehandelte Ausnahme: System.InvalidOperationException: Fehler bei der Installation, und der Rollback wurde ausgeführt. ---> System.UnauthorizedAccessException: Der Zugriff auf den Pfad "C:\Program Files\Duplicati 2\Duplicati.WindowsService.InstallState" wurde verweigert.
bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
bei System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
bei System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
bei System.IO.FileStream..ctor(String path, FileMode mode)
bei System.Configuration.Install.AssemblyInstaller.Install(IDictionary savedState)
bei System.Configuration.Install.Installer.Install(IDictionary stateSaver)
bei System.Configuration.Install.TransactedInstaller.Install(IDictionary savedState)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.Configuration.Install.ManagedInstallerClass.InstallHelper(String[] args)
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei Duplicati.Library.AutoUpdater.UpdaterManager.RunMethod(MethodInfo method, String[] args)
bei Duplicati.Library.AutoUpdater.UpdaterManager.<>c__DisplayClass58_0.<RunFromMostRecentSpawn>b__0()
bei Duplicati.Library.AutoUpdater.UpdaterManager.WrapWithUpdater(AutoUpdateStrategy defaultstrategy, Action wrappedFunction)
bei Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecentSpawn(MethodInfo method, String[] cmdargs, AutoUpdateStrategy defaultstrategy)
bei Duplicati.WindowsService.Program.Main(String[] args)
The logfile Duplicati.WindowsService.InstallLog
is now placed at the temp folder of the user and again contains the message from the cmd.
- Switched back to the user account
- Manually started Duplicati which runs normally
I don’t know what to do.
Stephan