Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27203

VS 2008 Windows Service that starts/restarts exe when user is logged in

$
0
0
I have a windows exe that does some automatic printing. Originally I wrote it as a service only to find that it did not send anything to the printer. The same code as a windows exe printed correctly so it was determined that the service part was the issue and the program was created as a windows exe. The problem now is that if someone stops the program the printing stops until someone either restarts the program or restarts the PC.

I am thinking that creating a separate service that could launch this program if needed also thinking it would need to test 2 things

Code:

If ProgramNotRunning Then   
    If UserLoggedOn Then
        StartProgram
    End IF
End IF

any suggestions of how I can code this in VB.Net 2005 or 2008 to test efficiently for logged on user and program running?

Viewing all articles
Browse latest Browse all 27203

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>