Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Install and uninstall service without any output #402

Closed
Elron1179 opened this issue Nov 10, 2017 · 8 comments
Closed

Install and uninstall service without any output #402

Elron1179 opened this issue Nov 10, 2017 · 8 comments

Comments

@Elron1179
Copy link

Elron1179 commented Nov 10, 2017

Hi there,
I have to deploy a service in an environment where any kind of output visible to the user (such as the console window topshelf is showing) is utterly prohibited.
Before trying to build a custom action for my installer which then creates a silent process which then calls the service, I would like to know if there is any option to prevent topshelf from producing any noticeable output.
Thank you very much.

Edit: was a bit hasty, start and end actions don't create any output.

@Elron1179 Elron1179 changed the title Install, start, end and uninstall service without any promt Install and uninstall service without any promt Nov 11, 2017
@Elron1179 Elron1179 changed the title Install and uninstall service without any promt Install and uninstall service without any output Nov 11, 2017
@cjpomer
Copy link

cjpomer commented Nov 14, 2017

Related: Exception stack traces get dumped to output during install. How can the exception be handled by user (and installation still fail).

@Elron1179
Copy link
Author

So there is no option to do this?

@maxcherednik
Copy link
Contributor

@Elron1179 redirect standard output somewhere else?

@Elron1179
Copy link
Author

No, I just want to omit it all and show no windows at all.

The reason for this is, that this installation-process is used in an automated MSI installation in a large environment. If now some users for whatever reasons manually close opening windows, which were opened by background processes, the processes could end up in unpredictable states.
Therefore it is policy, to never show such windows to the user.

I helped myself now by not using the topshelf installer. But I still hope that there will be a solution to that problem some day, so that I would be able to handle that problem directly with topshelf.

@maxcherednik
Copy link
Contributor

I see, I would say it is rather exotic requirement, but here are few options:
https://stackoverflow.com/questions/836427/how-to-run-a-c-sharp-console-application-with-the-console-hidden

@Elron1179
Copy link
Author

I see, I would say it is rather exotic requirement, but here are few options:

@maxcherednik Thank you for your response.

Since I've found a solution for my problem, it is not that vital to me anymore. And I can imagine, that there are more important issues to solve than that.

But I think, the possibility to run Topshelf silent via command would be a nice feature for all who want to use it in a remote/auto administrated environment, where any possible user interaction with the installation process is unwelcome in order to ensure flawless installations.

Maybe I'll find some time to take a look at it myself :)

@pellared
Copy link

@Elron1179 Are you creating the MSI using WiX? If yes then the solution may be to use WixQuietExec. See: http://wixtoolset.org/documentation/manual/v3/customactions/qtexec.html

@phatboyg
Copy link
Contributor

phatboyg commented Dec 6, 2020

I am closing all issues that haven't seen any activity. You're welcome to submit a PR to resolve the issue or provide more information.

@phatboyg phatboyg closed this as completed Dec 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants