Pregunta

I have created an application that installs and edits configuration settings for a 3rd party application. The application works fine but I need to prepare it for deployment, which means I need to edit it so that it can run silently. I've created it in Visual Studio 2012, if that makes any difference. It contains 3 Messagebox.Show for errors, that I suppose I should output to the error log, and the "Configuration Complete" prompt after success. There is a single button click to start the configuration function.

I have looked around and found only people trying to silently run other applications silently from within their code. If anyone can point me in the right direction I would be grateful.

¿Fue útil?

Solución

Just add a Module to your project.

Change your Startup Object to "Sub Main" in Project Properties>Application Tab

Then add a Sub Main your module:

Module Module1

    Sub Main()
        'call your program code here instead of from your button click
    End Sub

End Module

And yes you need to log your errors to a file instead of showing them in a Message Box

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top