I am using Windows Management Instrumentation (WMI) to connect to a remote system. I am connecting to a remote system and executing an exe on the remote system. This works if it is a normal exe. I am passing the user name and the password as well.
But when I use the same code in a Windows Service, I get an error which says "Access is Denied." My requirement is to invoke the exe (every 2 hours) on client system from a windows service on the server.
My code looks like this: