Re: ActiveX EXE as a service...



On Fri, 27 Jan 2006 10:06:32 GMT, "Dag Sunde" <me@xxxxxxxxxxxx> wrote:

>As of today, I'm running a VB6 application which also
>exposes a com-interface as a service under Win2000 AS.
>
>I'm using an application called SrvAny to set up and
>run my app as a system service.
>
>I feel rather unconfortable with this solution, as the
>behaviour is sometimes a little unstable.
>
>Sometimes it is impossible to shut it down. And sometimes
>it stops reacting. I've found no pattern to this behaviour.

I've seen services written with NTSvc.ocx, but they also seemed to suffer from
some flakiness. They were /not/ impossible to shut down, but on occasion would
hiccup and need to be "kill.exe" killed. This might have been due to Winsock
issues at the time and a poor, bottlenecked design, though.

<snip />

>The reason for running it as a service, is that it is a server
>application that needs to be restarted after an eventual power-
>failure, even if nobody is there to log in. (The start-folder,
>and the "run" key in registry is only executed when someone
>logs in).
>
>Any thoughts or ideas?

* Does a scheduled task run without the user having to be logged in? Maybe you
could leverage that somehow.
* I've heard of a utility that will run an application on boot - can't remember
where. I wonder if there is some way to use the system.ini like so:

[boot]
shell=Explorer.exe %Windows%\YourApplication.exe

I'm not sure if this applies to XP, but have you looked at the
HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices registry key too? I
believe you can point these keys to .exe files that are not actually services
<<< may be Win '95 specific info. You might be able to wrap the command line
with the RUNAS.EXE application to provide it a security context.

See http://support.microsoft.com/default.aspx?scid=kb;en-us;125714
& http://techrepublic.com.com/5100-10877_11-5604618-2.html for additional ideas
along this theme.
..:.:.:.

I haven't tried this myself, but take a look at
* http://www.freevbcode.com/ShowCode.asp?ID=4317.
* http://www.smsoft.ru/en/ntservice.htm

Here's the search I was using:
http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial_s&hl=en&q=VB6+NT+service&btnG=Google+Search

A commercial solution from Desaware:
http://www.xtras.net/products/ntservicetoolkit/

Hope this sparks some ideas...
_______________________
Michael B. Johnson
.



Relevant Pages

  • Re: ActiveX EXE as a service...
    ... >>exposes a com-interface as a service under Win2000 AS. ... >>I'm using an application called SrvAny to set up and ... > A commercial solution from Desaware: ...
    (comp.lang.basic.visual.misc)
  • Re: DVD drive not reading sometimes after SP3
    ... Boot to Safe Mode and log on as the default "Administrator" account. ... Click the registry key for the user that is currently logged on and ensure that Read and Full Control are both set to Allow. ... There are no issues in device manager, I double checked for windows updates ... and there are none since reloading the computer 2 weeks ago, ...
    (microsoft.public.windowsxp.help_and_support)
  • Boot Defrag... Enabled But Not Working?
    ... (Pentium 4\HT, 512 MB RAM, Win XP Home Ed.) ... although it takes over two minutes to boot up. ... When I checked the appropriate Registry key on my system this is what I see: ... Does this mean that my machine has NEVER succesfully completed a Boot Defrag? ...
    (microsoft.public.windowsxp.general)
  • Re: Boot Defrag... Enabled But Not Working?
    ... > The system basically works well, although it takes over two minutes to boot up. ... > When I checked the appropriate Registry key on my system this is what I see: ... > Does this mean that my machine has NEVER succesfully completed a Boot Defrag? ... Defragger Raxco PerfectDisk6 rocks! ...
    (microsoft.public.windowsxp.general)
  • Re: Regedit: error while deleting key
    ... In some Registry key structures ... you must delete from the most indented field first, moving upwards to ... Hardware Found wizard from reappearing every time I boot? ... That's right, no driver in Device ...
    (microsoft.public.windowsxp.general)