This won't work, and this is the reason why ...
Splunk service runs as "SYSTEM" for example, the script is run in this context, beneath splunkd.exe...
By default, the splunkd.exe service definition does not have the desktop interaction privilege.
Even if the privilege is assigned, you would possibly get a desktop alert from windows saying that the system account has something to show you, when you switch to that desktop it is extremely simplistic, no taskbar, no desktop icons, low resolution and isolated, it's hard work getting services to interact via desktop properly anyway and messaging between applications is a favorable alternative - using the Splunk REST API is a possibility?
Say that... if you changed the Splunk service identity to be your account, it will run in a separate session and probably wont alert you like the system account does anyway.
Services are very much behind the scenes, we just use the alerting mechanism, if you use outlook then knock up some rules or a VBA form to respond to the email alerts.
... View more