MSI's and Packaged Windows Services

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 6 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
Brendan49
Posts: 14
Last visit: Tue Feb 13, 2024 11:06 am

MSI's and Packaged Windows Services

Post by Brendan49 »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: PowerShell Studio 2017 v5.4.145
32 or 64 bit version of product: 64 bit
Operating system: Windows 10 Professional
32 or 64 bit OS: 64 bit

*** Please add details and screenshots as needed below. ***

DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM

Hi,

What is the best way to handle PowerShell scripts packaged as a Windows Service, and then trying to make them into an MSI for installation and uninstallation? Right now I've had to make my own separate Setup file that calls the Windows Service executable with /i or else /u. However, this does not play nice at all with an MSI that simply installs or uninstalls files. In this case, using Add Remove Programs to remove my Service merely causes it to get orphaned. That is, once uninstalled it still appears in Services.msc but there is now no way to even manually remove it (unless one used the original .exe that was just deleted, of course). And naturally, the service itself will no longer work because again, the .exe has now been deleted. (Technically, it will still work as it is in memory, but you can't restart it ever again).

Of course, if the user had first used my own custom Setup executable to stop and remove the service first, before going to Add Remove Programs and using the MSI to remove everything then this would all work. But we know users likely wouldn't do that.

So what do you think is the best way to handle this? There doesn't seem to be a way to perform any validation before using Add Remove Programs to uninstall everything packaged in the MSI.

Thanks,

Brendan
User avatar
Brendan49
Posts: 14
Last visit: Tue Feb 13, 2024 11:06 am

Re: MSI's and Packaged Windows Services

Post by Brendan49 »

For clarity, my last sentence should have read:

There doesn't seem to be a way to perform any validation WHILE using Add Remove Programs to uninstall everything packaged in the MSI.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: MSI's and Packaged Windows Services

Post by Alexander Riedel »

Eventually we will have a special option for a service installer. In the meantime you can look at free versions of popular installation tools, e.g. Advanced Installer.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 6 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.