Take a look at the following article:
https://learn.microsoft.com/en-us/windows/win32/services/interactive-services
It mentioned "Services cannot directly interact with a user as of Windows Vista. Therefore, the techniques mentioned in the section titled Using an Interactive Service should not be used in new code."