Tag: autostart

如何使用WiX安装和启动Windows服务

我试图在Wix中使用下面的代码。 但是,安装时,安装程​​序冻结了3分钟的状态:启动服务,然后我得到这个消息“Service Jobservice启动失败,请确认您有足够的权限启动系统服务”。 我的代码有错吗? 我可以要求用户在安装过程中inputwindows系统的用户名和密码来获得“权限”吗? 非常感谢! <File Id='JobServiceEXE' Name='JobService.exe' DiskId='1' Source='JobService.exe' Vital='yes' KeyPath='yes'/> <ServiceInstall Id="ServiceInstaller" Type="ownProcess" Vital="yes" Name="JobService" DisplayName="123 Co. JobService" Description="Monitoring and management Jobs" Start="auto" Account="LocalSystem" ErrorControl="ignore" Interactive="no" /> <ServiceControl Id="StartService" Stop="both" Remove="uninstall" Name="JobService" Wait="yes" /> </Component>

Android启动时的服务

我需要在启动时启动服务。 我搜查了很多。 他们在谈论Broadcastreceiver。 由于我是Android开发新手,我没有清楚的了解Android上的服务。 请提供一些源代码。