Map drive to Home Dir 
Author Message
 Map drive to Home Dir

You have to include the server name in the statement .
an example of the one I'm using is below:
    WshNetwork.MapNetworkDrive "S:", "\\Fiusray108\Public"
I hope this helps you out.  If there drive is already mapped you will
receive an error message that will cause your script to stop. I have
included the way I check for drives and map them below:

   If fso.DriveExists("S") Then
      WshNetwork.RemoveNetworkDrive "S:"
   End If
  WshNetwork.MapNetworkDrive "S:", "\\Fiusray108\Public"

Thank you,

Lee Tate


Quote:
> I am changing our login scripts from batch files to vb scripts. In my
batch
> file I used the line NET USE F: /HOME to map the home dir specified in the
> users profile. How do I do this using vb. I tried the following and it
does
> not work:

> Set WshNetwork = WScript.CreateObject("WScript.Network")
> WshNetwork.MapNetworkDrive "F:", "/HOME"

> Any help would be appreciated.
> Thanks, Sol.



Tue, 29 Jul 2003 00:02:48 GMT  
 Map drive to Home Dir
I know that normally you need to specify the server but the /home command
works when using a dos batch file for a login script.


Quote:
> You have to include the server name in the statement .
> an example of the one I'm using is below:
>     WshNetwork.MapNetworkDrive "S:", "\\Fiusray108\Public"
> I hope this helps you out.  If there drive is already mapped you will
> receive an error message that will cause your script to stop. I have
> included the way I check for drives and map them below:

>    If fso.DriveExists("S") Then
>       WshNetwork.RemoveNetworkDrive "S:"
>    End If
>   WshNetwork.MapNetworkDrive "S:", "\\Fiusray108\Public"

> Thank you,

> Lee Tate



> > I am changing our login scripts from batch files to vb scripts. In my
> batch
> > file I used the line NET USE F: /HOME to map the home dir specified in
the
> > users profile. How do I do this using vb. I tried the following and it
> does
> > not work:

> > Set WshNetwork = WScript.CreateObject("WScript.Network")
> > WshNetwork.MapNetworkDrive "F:", "/HOME"

> > Any help would be appreciated.
> > Thanks, Sol.



Tue, 29 Jul 2003 00:48:35 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Mapping user home dir in Windows 9X

2. Mapping Drives based on Home server in VBScript

3. Mapping home network drive.

4. Mapping drive to user's home directory

5. Mapping home drives in VBScript

6. How set Terminal server user profile and Home dir

7. How do I map a drive that has already been mapped

8. get drive size from network network mapped drives

9. fso on mapped virtual dir

10. change dir/cahnge drive

11. Setting Drive and Dir in WSH?

12. mapping home directories

 

 
Powered by phpBB® Forum Software