I have an incredibly annoying problem where my Win 10 license keeps randomly deactivating for no reason. Sometimes it lasts weeks without doing it but recently it seems to be doing it every other day. I've tried all available fixes I can find but none of them stick and eventually Windows deactivates itself again at some point (I do have a genuine valid retail license).
To fix it is easy but annoying: all I need to do is open Windows Settings>Activation and click on the Troubleshoot link and it immediately activates itself.
To make it even easier I've written a one line batch script that also activates it immediately and pinned it to my taskbar:
slmgr /ato
This works fine and I just click the script icon and it runs but also leaves a 'Windows Script Host' confirmation pop-up box on screen that I have to OK out of. Is there an easy (or easier) way to automatically close it as part of the script?
Sorry, I know nothing about coding but just want the quickest way to zap it when it happens (I know getting to the root of the deactivation problem would be better but I've tried everything I can find and just want it to go away in the least number of steps!)