Bug in Control Service

Got a problem you cannot solve? Try here.
Post Reply
prezmer
Posts: 31
Joined: Wed Jul 23, 2008 8:59 am
Location: Warsaw, Poland

Bug in Control Service

Post by prezmer »

Hello,
I've found a bug in control service. My simple project file (Native) should install 1 NT service. It should be started, and if application is uninstalled, stopped and deleted.

MSI code contains:
Install Service C:\BUILDS\ctiRight_BUILD\ctiRight\bin\ctiRight.exe to $TARGETDIR$ as ctiRights
Control Service ctiRights: start on install [wait for completion]
Control Service ctiRights: stop and delete on uninstall [wait for completion]

What is funny, line with "stop and delete on uninstall" is performed during installation :!: At least, when I stepped through the code and checked "Computer Management|Services"
best regards
Piotr Rezmer
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Bug in Control Service

Post by mills »

Are you getting an error?

On what OS are you testing?
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
prezmer
Posts: 31
Joined: Wed Jul 23, 2008 8:59 am
Location: Warsaw, Poland

Re: Bug in Control Service

Post by prezmer »

mills wrote:Are you getting an error?

On what OS are you testing?
Tested on Windows 2003 R2 Std 32b.
I can send you project file if it helps.
best regards
Piotr Rezmer
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Bug in Control Service

Post by mills »

What may be happening is the designer is generating code under the old MSI logic/construct.

When the native engine is in use, the commands are executed as they are seen. The control service commands had to be applied before apply install so MSI would know to run them on the uninstall.

Since IA will directly execute the command, it now needs to be moved from before Apply Install to before Apply Uninstall.

Code: Select all

if Variable REMOVE Equals TRUE
  Comment: Uninstall product
  Comment: TO-DO: Insert any additional uninstall commands here
  Control Service aaamyservicename: stop on install [wait for completion]
  Control Service Themes: stop and delete on uninstall [wait for completion]
  Apply Uninstall (get result into variable SUCCESS)
  Set Variable PROGRESS to 100
else
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
prezmer
Posts: 31
Joined: Wed Jul 23, 2008 8:59 am
Location: Warsaw, Poland

Re: Bug in Control Service

Post by prezmer »

So, what is your suggestion about how to solve this problem? Is it a bug or expected behavior? If expected, then it seems that using Hybrid Installation Technology requires significant changes in generated code.
best regards
Piotr Rezmer
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Bug in Control Service

Post by mills »

It is being considered expected behavior by our developers, but I'm trying to convince them that this a bug (difference between expected and actual behaviors).

Consider that your installer can move in and out of ENGINE modes, so we can't necessarily tell what you want to use. If we generate code for the NATIVE ENGINE, then we will run into problems when you're using the MSI ENGINE.

As a work-around, you can use a basic setup template and you will not experience this problem, however you won't necessarily be leveraging the speed of the NATIVE ENGINE.

I personally believe there's a more elegant approach to this scenario. I have proposed a feature request to allow you to choose which ENGINE style you want to generate code from the designer.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Post Reply