Connect to Network Drive with Login/Password 
Author Message
 Connect to Network Drive with Login/Password

I can make and connect to a mapped drive of a secure area by entering a
network login and password. I would like my VB program to be able to change
files at that location, but /without/ first mapping the drive, as the
desired location can be on several different servers.

Is there a way I can, from VB6, open and change files on the server,
requiring a login and password different than my normal user login, by
somehow transmitting that info in VB?

--
Regards,

Rick Raisley
rraisley-AT-harsco-DOT-COM

--
Regards,

Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net



Tue, 07 Feb 2012 01:57:05 GMT  
 Connect to Network Drive with Login/Password
As u can use "net use x: \\server\share /user:hej /password:hopp /
persistent:no" or something like that then its possible with ... is it
shelling out, or get an account on the servers that correspond.

the ... is shell, command, system or something, just not around my VB6
computer at this time.... someone will tell u, but thats a lousy
solution, too simple

//CY



Tue, 07 Feb 2012 03:05:23 GMT  
 Connect to Network Drive with Login/Password
Thanks. Problem is, I have about all my mapped drive letters used up. I need
this program to select various servers to connect to, and then write to
them, using credentials other than what I logged in as. So I'd really rather
avoid the mapped drive.

--
Regards,

Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net


Quote:
> As u can use "net use x: \\server\share /user:hej /password:hopp /
> persistent:no" or something like that then its possible with ... is it
> shelling out, or get an account on the servers that correspond.

> the ... is shell, command, system or something, just not around my VB6
> computer at this time.... someone will tell u, but thats a lousy
> solution, too simple

> //CY



Tue, 07 Feb 2012 03:14:51 GMT  
 Connect to Network Drive with Login/Password


Quote:
>I can make and connect to a mapped drive of a secure area by entering a
> network login and password. I would like my VB program to be able to
> change
> files at that location, but /without/ first mapping the drive, as the
> desired location can be on several different servers.

> Is there a way I can, from VB6, open and change files on the server,
> requiring a login and password different than my normal user login, by
> somehow transmitting that info in VB?

I think WNetAddConnection2 or WNetAddConnection3 will let you do that.


Tue, 07 Feb 2012 03:28:25 GMT  
 Connect to Network Drive with Login/Password

Quote:
>I can make and connect to a mapped drive of a secure area by entering a
> network login and password. I would like my VB program to be able to
> change
> files at that location, but /without/ first mapping the drive, as the
> desired location can be on several different servers.

> Is there a way I can, from VB6, open and change files on the server,
> requiring a login and password different than my normal user login, by
> somehow transmitting that info in VB?

Check NetUseAdd/WNetAddConnection2/WNetAddConnection3. I am not sure if
there is away to do it without mapping drives, but you could re-use the same
drive letter to connect to other shares once you are done with them.


Tue, 07 Feb 2012 03:32:42 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Network Login and connecting drives?

2. Connecting to password protected network drives

3. connect to the first free network drive and connect to an

4. Login-Password from network system

5. Passing Network Login Password

6. get drive size from network network mapped drives

7. Connecting to a network drive in VB.NET

8. Connect Network Drives as other user

9. Dynamically Connecting/Mapping network drives.

10. Connecting to network drive as a different user

11. Connecting a network drive?

12. connecting a NT network drive from VB ?

 

 
Powered by phpBB® Forum Software