| Hello. I found out some strange behaviour. Tested on Windows 7 systems in one domain. Suppose I have HostA and HostB in domain. HostA has userA as local admin, HostB - userB as local admin. I try to run  
 I think that explanations is - inspite tha fact that PaExec calls  function call  (probably because userA is the has some permissions on HostB). I can suggest some solutions 1) call before  It's not perfect because it affects current thread security context. I'm not very kind of changing security context, so may be there are another drawbacks... similar problem discussed here https://groups.google.com/forum/#!topic/microsoft.public.vc.mfc/yTYegk-z42I 2) call 
 
 
 
 
 And function call  it's proposed here http://stackoverflow.com/questions/2968426/wnetaddconnection2-from-a-windows-service PS PsExec has the same behaviour. After psexec \\HostB -u domain\userB -p password ipconfig It prints "Could not start PSEXESVC service.." | 
