﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
2186	WinNet UDF - AddConnection Functions - Help File Issue	MrMitchell	guinness	"In the Help File, for the _WinNet_AddConnection, _WinNet_AddConnection2, _WinNet_AddConnection3 functions, for $sLocalName parameter the doc says ""If 0, a connection to the network...without redirecting the local device."" 

I cannot get the function to work in this manner by passing a 0 as the $sLocalName parameter. The only way to get it to work is to pass either an empty string or the Null keyword.  In 3.3.9.4 beta either works fine. In 3.3.8.1 current production, passing only an empty string works since Null keyword isn't supported yet. Either way  both Help Files say pass a 0, so I believe the Help File should be updated - replacing 0 with Null and/or empty string.

This is very similar to issue #2132.

Here's code that doesn't work:
$sServer = '\\server\'
$sShare = 'C$'
$sUsername = 'domain\user'
$sPassword = 'password'
$sServerShare = $sServer & $sShare
$result = _WinNet_AddConnection2(0, $sServerShare, $sUsername, $sPassword, 1)
If $result Then
	ShellExecute(""Connection created to "", $sServerShare)
Else
	ConsoleWrite(""Unable to connect to "" & $sServerShare & @CRLF)
EndIf"	Bug	closed	3.3.9.5	Documentation	3.3.9.4	None	Fixed	WinNet	
