Creating Windows service available to all the system users - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

suajtha
Posts: 21
Joined: Wed Oct 28, 2009 5:38 am

Creating Windows service available to all the system users

Hi,

How to create a windows service which is available to all the system users, also to install this type of service is it required to have administrative privileges? if so how to get the dialog to provide administrative credentials.


Thanks,
Sujatha
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Creating Windows service available to all the system users

Hi Sujatha,

Services are by default installed per-machine, which means they will run regardless of which user is logged on. Administrative privileges are required to install services. On Windows Vista and above, users will be automatically prompted for elevation. On Windows XP, the install will fail unless the user is an administrator. You can consult our guide on The Services Page for a better understanding on how services are installed.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
suajtha
Posts: 21
Joined: Wed Oct 28, 2009 5:38 am

Re: Creating Windows service available to all the system users

GabrielBarbu wrote:Hi Sujatha,

Services are by default installed per-machine, which means they will run regardless of which user is logged on. Administrative privileges are required to install services. On Windows Vista and above, users will be automatically prompted for elevation. On Windows XP, the install will fail unless the user is an administrator. You can consult our guide on The Services Page for a better understanding on how services are installed.

Regards,
Gabriel
We are not able to access the service with user with user privilege and switching between users service is getting stopped.

We tried following options to create services.



Scenario-1

1) Installation type- Per Machine only(fails If user is not admin)

2) Service start type- Automatic



Scenario-2

1) Installation type- Per Machine if user is administrator, per-user otherwise

2) Service Start type- Automatic


Please suggest me, if is there any other approach.

Thanks,
Sujatha
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Creating Windows service available to all the system users

Hello,

Is your service a Java service? If so, then the behavior you are encountering may happen because the Java Virtual Machine receives incorrect signals. To avoid this behavior you can try using the Reduced usage of operating-system signals (-Xrs) option in the Edit JVM Parameters dialog (it can be launched from the Virtual Machine tab).

Otherwise it would be recommended that you debug your service or instruct it to create a log which you can study.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
suajtha
Posts: 21
Joined: Wed Oct 28, 2009 5:38 am

Re: Creating Windows service available to all the system users

GabrielBarbu wrote:Hello,

Is your service a Java service? If so, then the behavior you are encountering may happen because the Java Virtual Machine receives incorrect signals. To avoid this behavior you can try using the Reduced usage of operating-system signals (-Xrs) option in the Edit JVM Parameters dialog (it can be launched from the Virtual Machine tab).

Otherwise it would be recommended that you debug your service or instruct it to create a log which you can study.

Regards,
Gabriel
Hi Gabriel,

Thanks. Now i can able to see that service is started for user with user privilige in service panel. But when i am trying to access the service from client appication, i am facing problem saying that service is not running.

Please suggest me

Thanks,
Sujatha
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Creating Windows service available to all the system users

Hi Sujatha,

I'm not sure why you are encountering this behavior. Is the client application running under the user account for which the service is started? Also, when the application shows the error is your service marked as started in the Services applet (services.msc)? Additionally, can you please specify on which user account is the service logged on? You can find this by following these steps:
- open "services.msc"
- right-clicking your service
- select "Properties"
- go to the "Log On" tab

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
suajtha
Posts: 21
Joined: Wed Oct 28, 2009 5:38 am

Re: Creating Windows service available to all the system users

cosmin wrote:Hi Sujatha,

I'm not sure why you are encountering this behavior. Is the client application running under the user account for which the service is started? Also, when the application shows the error is your service marked as started in the Services applet (services.msc)? Additionally, can you please specify on which user account is the service logged on? You can find this by following these steps:
- open "services.msc"
- right-clicking your service
- select "Properties"
- go to the "Log On" tab

Regards,
Cosmin
Hi Cosmin,

Service is logged on Local system account. I installed the service with admin priviliges. After that i try to access that service from client application using user privilege.

Thanks,
Sujatha
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Creating Windows service available to all the system users

Hi,
After that i try to access that service from client application using user privilege.
When the application shows the error is the service marked as started in "Services.msc"? If so, does the application work under Administrator accounts? If it works, most likely your service does something which requires Administrator privileges. In this case I'm afraid that the service cannot be used under limited user accounts. This is a Windows limitation.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”