Need to develop CMD opertation net use to map network drive from NAV 2016.
Trying to use DotNet variable:
MappingCMDString:
The code:
But nothing being processed. Where i did mistake?
Trying to use DotNet variable:
- System.Diagnostics.Process.'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
- System.Diagnostics.ProcessStartInfo.'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
MappingCMDString:
net use %1 %2 /user %3 %4 /persistent:yes
The code:
SystemDiagnosticsProcessStartInfo := SystemDiagnosticsProcessStartInfo.ProcessStartInfo('cmd','/c"' + STRSUBSTNO(MappingCMDString,DriveLetter,Path,UserName,Password) + '"'); SystemDiagnosticsProcessStartInfo.RedirectStandardError := TRUE; SystemDiagnosticsProcessStartInfo.RedirectStandardOutput := TRUE; SystemDiagnosticsProcessStartInfo.UseShellExecute := FALSE; SystemDiagnosticsProcessStartInfo.CreateNoWindow := TRUE; SystemDiagnosticsProcess := SystemDiagnosticsProcess.Start(SystemDiagnosticsProcessStartInfo); CLEAR(SystemDiagnosticsProcess);
But nothing being processed. Where i did mistake?