Why is my Windows Service getting deleted after a Windows Update on Win 10

RXGeorge
RXGeorge used Ask the Experts™
on
I am running a Windows 10 virtual machine on Azure.   I have deployed my application using  simple copy file approach (not MSI).   After which, i am successfully creating the service using SC.exe as follows:

sc create "VNCServer.Service" binPath="C:\server\VNCServer.exe"

net start "VNCServer.Service"

sc config "VNCServer.Service" start= auto  

Everything works as expected for weeks (including many reboots) until the next Windows update is taken.  After taking the Windows update, the service appears to have been deleted.  I need to rerun the script above to create the service each time a windows update occurs.

What is happening here?  What can I do?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2018
Commented:
Try a service name without "."
Windows setup kills services with names it dislikes the characters of. Seen that.

Author

Commented:
Not sure how to confirm that this is the answer.  It will take time to know if this is the right solution.  I hope it is, but cannot confirm until we get a few more updates to OS.
Distinguished Expert 2018

Commented:
Take a test installation with windows 10 v1703, create that service, do an inplace upgrade to version v1709 and see if the service remains there. Of course you might be running other builds of windows 10, take those that you use.
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

Distinguished Expert 2018

Commented:
RXGeorge, it is not that hard to try. Please return with feedback or this will be deleted.

Author

Commented:
Thanks

Author

Commented:
Your answer was correct.  It appears.  Thanks very much.
Distinguished Expert 2018

Commented:
You are welcome.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial