I wrote a test program in c++ with the exact same parameters and that works without problems on the same mashine with the same user and the same share
I tried all settings for RequestExecutionLevel but it dosn't make a difference
Is my struct wrong or does nsis run in some crazy context?
I am using the current version of NSIS3
Here is my code:
!define NETRESOURCE (i,i,i,i,p,p,p,p)
StrCpy $R5 "\\Dkendoa2\Test2"
StrCpy $R6 "Y:"
System::Call '*${NETRESOURCE}(0,0,0,0,t "$R6",t "$R5",0,0)p.r1'
System::Call 'MPR::WNetAddConnection2(p r1, t n, t n, i 0)i.r0'
MessageBox MB_OK "$0"