Mapping user home directory in VB on Win95 
Author Message
 Mapping user home directory in VB on Win95

Hi,

Can anyone tell me how to map a user's home share in VB on Win95.

I know how to use the WnetConnection2 call to map drives normally, but cant
for the life of me work out how do  the equivalent to the DOS command

    Net Use U: /home

Cheers,
Bob



Mon, 08 Apr 2002 03:00:00 GMT  
 Mapping user home directory in VB on Win95
I would use

retvalue = shell("net use U: /HOME", vbHide)

NOTE: This will map the drive... vbHide means you will not see it run
however i recommend you make a shortcut in the c:\Windows directory called
NET this will be a pif file as all shortcuts are. Set its properties to
Net.exe and tick the close when finished checkbox... this is so that the
dosapp does not stay running!

Note Also: The drive you map is not "Persistent" that is it will not
automatically reappear each time you boot the system.

As an aside I map drives like this in my app in case they are not mapped
already on the system when my application runs. I want to unmap them when my
application closes but Net use U: /DELETE does not seem to work correctly.
Sometimes I see a red cross on the drive in Windows explorer but as soon as
I click on the drive the cross disappears and I am given access. Seems like
Windows 98 is too smart at repairing disconnected drives.

If anyone knows of a better way to Map / Unmap drives in vb then I am all
ears!


Quote:
> Hi,

> Can anyone tell me how to map a user's home share in VB on Win95.

> I know how to use the WnetConnection2 call to map drives normally, but
cant
> for the life of me work out how do  the equivalent to the DOS command

>     Net Use U: /home

> Cheers,
> Bob



Sun, 21 Apr 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. need vb script to change users home directory in on fell swoop (active directory)

2. Query Active Directory for User's Home Directory Path

3. mapping home directories

4. WSH mapping of Home Directory

5. set home directory permissions for all users in a domain

6. how can I create or asing a home directory to users profiles with a script

7. Need To Get Current Users Home Directory in NT

8. Finding Current Users Home Directory On NT 4.0

9. Active Directory User and Computers mappings for ADSI

10. Active Directory User and Computers mappings for ADSI

11. New Home for a VB Home Page

12. Home Folder Mapping

 

 
Powered by phpBB® Forum Software