goldeneaglesteam
Posts: 25
Joined: Tue Feb 20, 2018 12:42 am

how to prevent this custom action from raising if this VSalesp service is exist

hi,

i use this custom action to install MySQL Server 5.7.21 and configure it as your recommendation in another post :

file to launch :

Code: Select all

[ProgramFilesFolder]MySQL\MySQL Installer for Windows\MySQLInstallerConsole.exe
command line :

Code: Select all

community install server;5.7.21;X86:*:servertype=Server;Port=3309;ServiceName=VSalesp;passwd=$$$$$ -silent
working dir:

Code: Select all

[ProgramFilesFolder]MySQL\MySQL Installer for Windows
it work fine , at first installation , the software installed successfully also the server installed successfully.

sometimes we uninstall the software and reinstall it (the server is still exist) , but the custom action fire again and cause many problems for the exist Mysql server cause it stopped.
so, how to prevent this custom action from raising if this VSalesp service is exist or any other solving ?
thanks
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: how to prevent this custom action from raising if this VSalesp service is exist

Hello,

To do so you can just use, previously scheduled, a "Detect service" custom action that will search for the related service name and save the result into the AI_SERVICE_STATE property.

Then you can simply condition your existing install custom action like this: AI_SERVICE_STATE = "Not Found".

Hope this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
goldeneaglesteam
Posts: 25
Joined: Tue Feb 20, 2018 12:42 am

Re: how to prevent this custom action from raising if this VSalesp service is exist

hi,
i created a "Detect service" , but i don't know how add condition to the exist custom action
goldeneaglesteam
Posts: 25
Joined: Tue Feb 20, 2018 12:42 am

Re: how to prevent this custom action from raising if this VSalesp service is exist

please check , .. it is correct ?
Capture.JPG
Capture.JPG (18.46 KiB) Viewed 7000 times
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: how to prevent this custom action from raising if this VSalesp service is exist

Hello,

Yes, the condition is correct.

Please let us know if there is anything else we could help you with.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
goldeneaglesteam
Posts: 25
Joined: Tue Feb 20, 2018 12:42 am

Re: how to prevent this custom action from raising if this VSalesp service is exist

thank you ..

how to check for multi services ? so, if any of them founded don't execute the current custom action

i used this "AI_SERVICE_STATE = "Not Found"" for every one so custom action , so it will run only if the previous one not found.
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: how to prevent this custom action from raising if this VSalesp service is exist

Hello,
how to check for multi services ?
Unfortunately, we do not offer predefined support for this task.

However, this can be achieved in the following way:

- you can have multiple "Detect Service" custom actions.

- after each "Detect Service" custom action, use a "Set installer property" custom action to save the value of "AI_SERVICE_STATE" property into another property. This is mainly done to avoid the overwriting of the "AI_SERVICE_STATE" property (because it will overwrite everytime a "Detect Service" CA will execute).

- use the value of the above properties as your condition.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
goldeneaglesteam
Posts: 25
Joined: Tue Feb 20, 2018 12:42 am

Re: how to prevent this custom action from raising if this VSalesp service is exist

Catalin wrote: ↑Wed Jul 10, 2019 3:50 pm Hello,
you can have multiple "Detect Service" custom actions.
- in each "Detect Service" custom action, i set condition "AI_SERVICE_STATE = "Not Found"" before starting ..

1- if AI_SERVICE_STATE = "started" or "stopped" => don't run the next "Detect Service" custom action
2- if AI_SERVICE_STATE = "Not Found" => run the next "Detect Service" custom action.

i think it will work , i will try it
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: how to prevent this custom action from raising if this VSalesp service is exist

Hello,
i think it will work , i will try it
Sure, please let me know how this goes.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”