with NRW do
begin
dwType := RESOURCETYPE_ANY;
// lpLocalName := ''; // map to this driver letter
lpRemoteName := PChar(orders);//共享机器的名字
// Must be filled in. If an empty string is used,
// it will use the lpRemoteName.
lpProvider := '';
end;
WNetAddConnection2(NRW, PChar(passsword), PChar(usename),CONNECT_UPDATE_PROFILE);