toast icon indicating copy to clipboard operation
toast copied to clipboard

Its not possible to create toast notification as service

Open ericrange opened this issue 6 years ago • 3 comments

ericrange avatar Sep 06 '18 16:09 ericrange

Hi @ericrange,

Would you be able to provide some more detail around the issue?

jmshal avatar Sep 06 '18 20:09 jmshal

its windows thing. a service dont have access to a active window user session. its possible but it needs some windows-dll magic :( the toast notification apears if you start the program as a user. but not, in a service context.

ericrange avatar Sep 09 '18 14:09 ericrange

Add this line before Push():

os.Setenv("PATH", "C:\\Windows\\System32\\WindowsPowershell\\v1.0")

If process is run as a Windows service then you PATH env is empty

maciekzieba avatar May 26 '22 11:05 maciekzieba