Service starting with incorrect path

Having trouble running Advanced Installer? Got a bug to report? Post it all here.
Post Reply
aaguirre
Posts: 2
Joined: Wed Apr 24, 2019 8:58 pm

Service starting with incorrect path

Post by aaguirre » Wed Apr 24, 2019 9:37 pm

Hi, Im having an issue with a service start, i describe what im doing:

I have a per machine installer, and i was in need to remove previous per user versions, that is not possible in advanced installer right now so i did a trick.
With a custom action before FindRelatedProducts I detect previous per user installation, set that productcode in the OLDPRODUCTS property, and also set ALLUSERS property to an empty string (thats how I get advanced installer to remove previous version of a different type of installation), then, after FindRelatedProducts i set ALLUSERS back to "1".

Everything goes as expected, the installer removes previous per user versions, then installs the application, but my application has a service, and installer crashes because the service cant be started, because the service path is wrong, its path is taken from APPDIR variable, but it points to local user folder and not to program files, that problem is caused by the trick.

I tried to fix APPDIR value in another custom action, and im setting it in multiple different parts of the installer, but the service path keeps the wrong path no matter what i tried.

Can I get some ideas on how to fix it? when is the service path set in the installation?
Edit: How can i change the path of the service component in a custom action before it is installed?

Thanks in advance.

Catalin
Posts: 1528
Joined: Wed Jun 13, 2018 7:49 am

Re: Service starting with incorrect path

Post by Catalin » Tue May 07, 2019 1:29 pm

Hello and welcome to Advanced Installer forums,

First of all, please accept my apologies for the delayed reply, but we had our Orthodox Easter holiday here.

In what regards your problem, this may be caused by the "Use original installation path when upgrading" option. Could you please try to uncheck this option ("Upgrades" page --> "Application Versions" section), rebuild the project and let me know if that helps?

Looking forward to hearing from you.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Post Reply