Click here to Skip to main content
15,570,202 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I was doing remote system file access (i.e., Writing a file in remote machine & reading the same file from that machine). For that I established a connection using
WNetAddConnection2 


It works fine while I run it directly in my account.
But while launching from system account (i.e., Launching from service, using pstool (or) registered in services.msc) it is not working.

It returns with an error code of 1312 from GetLastError(), means
NO_SUCH_LOGON_SESSION



How should I proceed now?

Please help me..

Thanks & regards,
Yugeshkumar V
Posted

1 solution

System account doesn't have access to network resources so you should use some account which have privileges top access network (like yours does).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900