Local Security Policy - Service Will not Auto Start

Got a problem you cannot solve? Try here.
Andrew Brent
Posts: 10
Joined: Thu Jan 30, 2014 4:02 am
Location: United Kingdom
Contact:

Local Security Policy - Service Will not Auto Start

Postby Andrew Brent » Tue Mar 24, 2015 5:09 am

Hi
We are deploying a package only to our own domain machines. We have found that deploying a SERVICE that can run updates for our own software under the System Account doesn't work and creating a local admin account is the best way to achieve our goal. However, when IA creates the new user, that user has not been assigned rights to run as a service. i.e. Local Security Policy. We cannot find anything in IA to do this. Have we missed something????

We have a small utility written in house to change the LSP and have successfully run this from inside the IA package and it works. However, we then run into problems with IA failing to run the service on install, this is the pseudo code.
Create OURLocalServiceUserName

Install Our LSP Utility to $TARGETDIR$
Apply Install ' This seems to be the only way to get IA to run this utility before the whole Install completes

Run Our LSP Utility startup in folder $TARGETDIR$ (WAIT)

Install Service Our.EXE to $TARGETDIR$ as OurService
Apply Install etc.

if Variable SUCCESS not Equals ERROR
IF Variable SUYCCESS not EQUALS Cancel

Control Service OurService: start on install, set startup to automatic [wait for completion] ' this does not seem to work !!!!!!!!!!!!!!!

As a workaround we have at this point displayed a messagebox and then proceed to reboot the machine which runs the service runs as expected. So why didn't the IA Control Service work?
We have also noticed that when Uninstalling a service it is not removed from the list of services on the machine. Can you please fix this in your next release?

Kind regards.

Andrew
Andrew Brent
Designer Contracts Ltd
Visual Studio 2022 - DevExpress - InstallAware X15

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Local Security Policy - Service Will not Auto Start

Postby FrancescoT » Tue Mar 24, 2015 12:50 pm

Dear Andrew,

If your setup is based on Windows Installer Engine, the "Control Service" command is not executed immediately but deferred to Apply Install execution.
This happens with any Windows Installer command (PURPLE COMMANDS).
http://www.installaware.com/forum/viewtopic.php?f=2&t=4338

did you try with executing the "Control Service" command within a Native Engine ON/OFF sequence?

Code: Select all

Set Variable NATIVE_ENGINE to TRUE
Control Service : start on install
Set Variable NATIVE_ENGINE to FALSE

The above code causes the immediate execution of the command.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Andrew Brent
Posts: 10
Joined: Thu Jan 30, 2014 4:02 am
Location: United Kingdom
Contact:

Re: Local Security Policy - Service Will not Auto Start

Postby Andrew Brent » Fri Apr 10, 2015 10:02 am

Thanks, I've been away recently and just picked this up. I'll try your suggestion.

Cheers
Andrew
Andrew Brent
Designer Contracts Ltd
Visual Studio 2022 - DevExpress - InstallAware X15

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Local Security Policy - Service Will not Auto Start

Postby FrancescoT » Fri Apr 10, 2015 1:33 pm

:D
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 116 guests