Hello Dat,
Thank you for your followup on this, as I now understand your scenario better.
I see you are trying to create a service for your executable so it is always run when the user starts his machine.
This is indeed a correct approach for your need. However, please note that not all the EXEs can be run as services.
In order for an EXE to be run as a service, you will need to configure it accordingly. It has to implement the interface that the Windows service manager expects. For instance, your executable should know how to respond to the "Start"/"Stop" commands received by the Service Manager.
A solution that is very similar to what you want to achieve and that does not require any code modifications would be using the Windows Task Scheduler.
Basically, you can create a scheduled task that will run your executable at each user logon, with the required parameters.
Advanced Installer offers predefined support for this, in the Enterprise suite, through the
"Scheduled Tasks Page".
So, in your case, we have two approaches:
- either configure your executable so it can run as a service
- create a scheduled task that basically does the same
Hope this helps!
Best regards,
Catalin