6 Replies - 2370 Views - Last Post: 17 December 2015 - 07:43 AM Rate Topic: -----

#1 OldWarrior   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 14-December 15

run as service an vb6 exe project with windows forms

Posted 15 December 2015 - 03:37 AM

Hi to All,

I'm an old developer with the partial job of maintain a lot of vb6 vbp projects and convert some of them to vs2015, I know both IDE and several others IDE and languages, fluent also en javascript, html, css and so on.

The boss are wanting to "convert" some vb6 exe projects to "running as service" in Windows Server 2012.
Also the company wants no msgbox or similar but using the "monitor messages" in win server 2012.

The exe works well today in these environment, and I don't know/understand the need ro run as service.

The project runs continually without user intervention, but shows a main form "form1" (that can run minimized even hide) with menu and buttons for some actions that are not neccesary daily, even the exe can run weeks without user intervention.
The project also execute other related .exe also with some info forms, also showing some msgbox in the event of some error and so on.

Thus, a "normal" win form vb6 only suited to run alone "server type" with not database or odbc, mainly some webservices, sockets access and print reports.

The question is

¿Can an vbp with forms .exe run as service? even "shelling/calling" to other related .exe.
¿Is there some product/dll that can be purchased to "encapsulate" the exe in a service program?
¿Can the msgbox and other similar forms for alerts/errors be changed to use "monitor messages" or so?

I've used the search but not sure to found some similar, and sorry my english is very poor.

All the best.
poor warrior in Spain.

Is This A Good Question/Topic? 0
  • +

Replies To: run as service an vb6 exe project with windows forms

#2 maj3091   User is offline

  • D.I.C Lover
  • member icon

Reputation: 330
  • View blog
  • Posts: 1,998
  • Joined: 26-March 09

Re: run as service an vb6 exe project with windows forms

Posted 16 December 2015 - 08:30 AM

I've used SRVANY.exe to run vb6 apps as services without issue (can't comment on 2012 though).

Sorry, can't comment on the issue regarding the message box as our apps don't use them.
Was This Post Helpful? 1
  • +
  • -

#3 OldWarrior   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 14-December 15

Re: run as service an vb6 exe project with windows forms

Posted 16 December 2015 - 09:30 AM

View Postmaj3091, on 16 December 2015 - 08:30 AM, said:

I've used SRVANY.exe to run vb6 apps as services without issue (can't comment on 2012 though).

Sorry, can't comment on the issue regarding the message box as our apps don't use them.


Thanks very much.
I've read some about srvany.exe in a lot of sites speaking about it is a source of virus and malware, thus because I am looking for some other tool or way to go, I appreciate if you are using nd it is safe.

In regard of the message box, ¿is your app sending messages to the app log events or monitor or so?
I'm also interested in change msgbox and sends to messages to a windows system that can be monitorized in event viewer or similar.

Now the vbp writes a log file (a simple txt.log) shows a messagebox when critical errors as server down and so on.

Thanks!
Was This Post Helpful? 0
  • +
  • -

#4 maj3091   User is offline

  • D.I.C Lover
  • member icon

Reputation: 330
  • View blog
  • Posts: 1,998
  • Joined: 26-March 09

Re: run as service an vb6 exe project with windows forms

Posted 17 December 2015 - 01:00 AM

Never heard anything about srvany being an issue, as I thought it was from Microsoft (not that means it's secure! :) ).

In regards to the event log, you could try app.logevent , see this link for more information, seems you can use an API also.

I've no experience of the above as I normally write to a text log file.
Was This Post Helpful? 1
  • +
  • -

#5 OldWarrior   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 14-December 15

Re: run as service an vb6 exe project with windows forms

Posted 17 December 2015 - 03:08 AM

View Postmaj3091, on 17 December 2015 - 01:00 AM, said:

In regards to the event log, you could try app.logevent , see this link for more information, seems you can use an API also.

I've no experience of the above as I normally write to a text log file.


Thanks, I will try to read some related 'cause the app.logevent and the link provided is related only to vb6, not vb.net, but I got the idea.

Thanks!

seems the similar code in vb.net is
My.Application.Log.WriteEntry("xxxx")

other mentions are for System.Diagnostics
Was This Post Helpful? 0
  • +
  • -

#6 maj3091   User is offline

  • D.I.C Lover
  • member icon

Reputation: 330
  • View blog
  • Posts: 1,998
  • Joined: 26-March 09

Re: run as service an vb6 exe project with windows forms

Posted 17 December 2015 - 07:21 AM

Sorry, thought you where referring to VB6.

Good luck anyway.
Was This Post Helpful? 0
  • +
  • -

#7 OldWarrior   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 14-December 15

Re: run as service an vb6 exe project with windows forms

Posted 17 December 2015 - 07:43 AM

Ok, sure, I'm using both environments,
I need to maintain a lot of old vbp projects, besides the new ones are created in vbNet (vs2015),
really confusing, a nightmare to myself
:stupid:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1