I have an Octopus / powershell script that attempts to install my topshelf service on a given box. I get an error that a dialog box was popped in a non-UI app (Octopus tentacle).--Unhandled Exception: System.InvalidOperationException: The installation failed, and the rollback has been performed. ---> System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.Error 15:51:06at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)Error 15:51:06at System.Windows.Forms.Form.ShowDialog()Error 15:51:06at System.ServiceProcess.ServiceProcessInstaller.GetLoginInfo()Error 15:51:06at System.ServiceProcess.ServiceProcessInstaller.get_Account()Error 15:51:06at System.ServiceProcess.ServiceInstaller.Install(IDictionary stateSaver)Error 15:51:06at System.Configuration.Install.Installer.Install(IDictionary stateSaver)Error 15:51:06at Topshelf.Runtime.Windows.HostInstaller.Install(IDictionary stateSaver)Error 15:51:06at System.Configuration.Install.Installer.Install(IDictionary stateSaver)Error 15:51:06at System.Configuration.Install.TransactedInstaller.Install(IDictionary savedState)Error 15:51:06--- End of inner exception stack trace ---Error 15:51:06at System.Configuration.Install.TransactedInstaller.Install(IDictionary savedState)Error 15:51:06at Topshelf.Runtime.Windows.HostServiceInstaller.InstallService(Action`1 beforeInstall, Action`1 afterInstall, Action`1 beforeRollback, Action`1 afterRollback)Error 15:51:06at Topshelf.Runtime.Windows.WindowsHostEnvironment.InstallService(InstallHostSettings settings, Action beforeInstall, Action afterInstall, Action beforeRollback, Action afterRollback)Error 15:51:06at Topshelf.Hosts.InstallHost.Run()Error 15:51:06at TopShelf.HostRunner.TopShelfHostRunner.Run(IWindsorContainer container, String serviceName, String serviceDisplayName, String serviceDescription, Action`1 hostConfigAction) iHere is the relevant piece of my powershell script:# try and install / update the service by name$service = Get-Service $ServiceName -ErrorAction SilentlyContinue$fullPath = Resolve-Path $ServiceExecutableWrite-Host "fullPath = $fullPath"if (! $service){#TODO: consider adding support for user/password. See http://topshelf.readthedocs.org/en/latest/overview/commandline.htmlWrite-Host "The service will be installed."& "$fullPath" "install" | Write-Host}else{Write-Host "The service will be stopped and reconfigured."& "$fullPath" "stop" | Write-Host& "sc.exe" config $service.Name binPath= $fullPath start= auto | Write-Host}How do you prevent the topshelf installation from popping a dialog box?thanksscott
You received this message because you are subscribed to the Google Groups "topshelf-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topshelf-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.