Running Image as a Windows Service

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Running Image as a Windows Service

Runar Jordahl
Package WinService in the Store public repository provides
functionality to install a Windows Service (NT Service) on Windows.
This function simply registers a service by giving a name and a path
name to an ".exe" file.

I wonder how I make (package) a runtime image that will work as a
valid ".exe" file for a registered Windows Service. Will I need to
make a headless image, or will a regular runtime image work? Also – I
want to have the service show an icon in the tray area of the taskbar.
When the icon is clicked, a GUI should open. Can this easily be done?
This last requirement seems to indicate that a headless image is not
the direction I should be heading.

Runar Jordahl

Reply | Threaded
Open this post in threaded view
|

Re: Running Image as a Windows Service

Michael Lucas-Smith
G'day.

As a window service, you're not given access to any kind of GUI - so
you cannot put yourself in th etask bar, or show any windows - or
anything like that. You have to be headless.

UNLESS - you use srvany.exe which wraps up the gui part and makes it
all work nicely except it's not a native service, it's a wrapped
regular application.

Cheers,
Michael

> Package WinService in the Store public repository provides
> functionality to install a Windows Service (NT Service) on Windows.
> This function simply registers a service by giving a name and a path
> name to an ".exe" file.

> I wonder how I make (package) a runtime image that will work as a
> valid ".exe" file for a registered Windows Service. Will I need to
> make a headless image, or will a regular runtime image work? Also – I
> want to have the service show an icon in the tray area of the taskbar.
> When the icon is clicked, a GUI should open. Can this easily be done?
> This last requirement seems to indicate that a headless image is not
> the direction I should be heading.

> Runar Jordahl

Reply | Threaded
Open this post in threaded view
|

Re: Running Image as a Windows Service

Wolfgang Eder
Michael Lucas-Smith wrote:
> G'day.
>
> As a window service, you're not given access to any kind of GUI - so
> you cannot put yourself in th etask bar, or show any windows - or
> anything like that. You have to be headless.

Hello,
I don't think this is true. when you look at the properties
window of the services control panel, you can specify whether
the service may interact with the desktop.
But I have never tried this myself.
HTH
Wolfgang

>
> UNLESS - you use srvany.exe which wraps up the gui part and makes it
> all work nicely except it's not a native service, it's a wrapped
> regular application.
>
> Cheers,
> Michael
>
>> Package WinService in the Store public repository provides
>> functionality to install a Windows Service (NT Service) on Windows.
>> This function simply registers a service by giving a name and a path
>> name to an ".exe" file.
>
>> I wonder how I make (package) a runtime image that will work as a
>> valid ".exe" file for a registered Windows Service. Will I need to
>> make a headless image, or will a regular runtime image work? Also � I
>> want to have the service show an icon in the tray area of the taskbar.
>> When the icon is clicked, a GUI should open. Can this easily be done?
>> This last requirement seems to indicate that a headless image is not
>> the direction I should be heading.
>
>> Runar Jordahl
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Running Image as a Windows Service

Volker Zink
Although i have never done this, it is possible to have a Windows
service to interact with the user. Microsoft calls this 'interactive
services'. Take a look at

    http://msdn2.microsoft.com/en-gb/library/ms683502.aspx

and

   
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/interactive_services.asp

to read more about it. Hope this helps ... Oops.  They added this won't
work for Windows Vista.

Volker


Wolfgang Eder wrote:

> Michael Lucas-Smith wrote:
>> G'day.
>>
>> As a window service, you're not given access to any kind of GUI - so
>> you cannot put yourself in th etask bar, or show any windows - or
>> anything like that. You have to be headless.
>
> Hello,
> I don't think this is true. when you look at the properties
> window of the services control panel, you can specify whether
> the service may interact with the desktop.
> But I have never tried this myself.
> HTH
> Wolfgang
>
>>
>> UNLESS - you use srvany.exe which wraps up the gui part and makes it
>> all work nicely except it's not a native service, it's a wrapped
>> regular application.
>>
>> Cheers,
>> Michael
>>
>>> Package WinService in the Store public repository provides
>>> functionality to install a Windows Service (NT Service) on Windows.
>>> This function simply registers a service by giving a name and a path
>>> name to an ".exe" file.
>>
>>> I wonder how I make (package) a runtime image that will work as a
>>> valid ".exe" file for a registered Windows Service. Will I need to
>>> make a headless image, or will a regular runtime image work? Also � I
>>> want to have the service show an icon in the tray area of the taskbar.
>>> When the icon is clicked, a GUI should open. Can this easily be done?
>>> This last requirement seems to indicate that a headless image is not
>>> the direction I should be heading.
>>
>>> Runar Jordahl
>>
>>
>
>
>


Volker.Zink.vcf (452 bytes) Download Attachment