Hi, Im trying to use the function LogonUser, but I keep getting the error "Logon failure: unknown user name or bad password".
Im using LogonUser because I need to create a process running as another user, and CreateProcessAsUser needs a handle, which Im supposed to get from LogonUser. I have a service that starts a .bat file, and this file accesses a network path. This fails because the service runs as system account and cant access network resources. I want to duplicate the behaviour of the Windows Task Scheduler, where you can supply username+password, while the service still runs as system account. How do they do that?
I have of course verified that the username/password's I use are correct ;)