Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Programatically access a password protected directory


Reply
 
Thread Tools Display Modes
  #1  
Old 07-24-2002, 10:14 AM
papaflo
Guest
 
Posts: n/a
Default Programatically access a password protected directory


Hi,

I'm working in a Win2000 / Visual Basic 6.0 environment.

I want to copy files from a certain directory [the directory is actually on another machine, but I don't think that makes much difference in this case]. Everything is fine when there's is no security set up for the abovementioned directory. However, there has to be security and I can only do the copying if I first launch Windows Explorer, access the directory, and input the valid username and password. If I don't this, I am not able to copy the files I want.

I am currently using FileSystemObject's CopyFile method.

Should I use another approach here? Is there any way I can programatically access a password protected directory. Is there any API function or low level stuff maybe that I can use.

Please help,

Flor
Reply With Quote
  #2  
Old 07-24-2002, 10:31 AM
jcd
Guest
 
Posts: n/a
Default

Could you map a network drive and put your password/uname in when mapping the drive??
Regards
JCD
Reply With Quote
  #3  
Old 07-24-2002, 11:13 AM
papaflo
Guest
 
Posts: n/a
Default

jcd,
thank you.
as a matter of fact, that's seems like the only solution i have for now. i understand that I have to map the desired directory and enter uname/password on log-on or log-on under a particular user and add that user to the network where I copy files from so that I can have automatic access and not worry about entering passwords.
i was just hoping that you can change the access status programatically because that would be kind of cool.
flor
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->