I'm coding a Windows service using where I'm not supposed to create a GUI & thereby can't trap events using WTSRegisterSessionNotification. Instead, this page says that
Below is my code snippet
#include "Log.au3"
#include "Misc.au3"
#include "Network.au3"
#include "Services.au3"
#include "Credentials.au3"
#NoTrayIcon
#AutoIt3Wrapper_Change2CUI=y
Global $sServiceName = "BlockInternet"
Global $sServiceDisplayName = "BlockInternet"
If Not @Compiled Then Exit
If Not _Singleton(@Scri