• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 478
  • Last Modified:

How do I run a vb.net windows application from a vb.net Service?

I am totally new to Windows Services and I need to write one in vb.net that simply calls a vb.net Windows application. The Windows App is a small program that runs continuously, monitoring messages and running timed reports. It has a user interface for the administrator to just show the event log and so you can see when the next timed event will be.

I need this app to always be running on the server even when the administrator has logged off and it needs to always start again if the server has been restarted for any reason, hence I thought a service that calls it would be the best way to do it.

I have created a vb.net Windows Service project, added a service installer, set the starttype to automatic but I am not sure where or how to "shell" to my app (Process.start I think?)

Any help would be much appreciated!
0
alexking
Asked:
alexking
  • 2
1 Solution
 
alexkingAuthor Commented:
I'm following this through, have created something simple that just uses:

        System.Diagnostics.Process.Start("MyApp.exe")

as the samples seemed to dive into C++ which I am not using and am not familiar with, but am now struggling to install it using the link to http://www.dotheweb.net/articles/dotnet/services4.aspx - i have created an installer but when I install on the target server I am asked to "set service login", username and password dialogue box. I enter my login and password (I am logged in as administrator)  but it says "The account name is invalid or does not exist or the password is invalid for the account name specified" - it isn't, it is my main administrator account that I am logged in as!!
0
 
alexkingAuthor Commented:
Just found changing ProcessInstaller account to LocalSystem gets rid of this dialogue so trying again :)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now