Results 1 to 4 of 4

Thread: Hide full path in Windows explorer of mapped drive

  1. #1
    Join Date
    Feb 2006
    Posts
    176

    Hide full path in Windows explorer of mapped drive

    I am currently using net use in the login script to show mapped drives in Windows Explorer for my users. It seems as Share on 'server\share'. Can anyone tell me a way to just show it as Share only? I do not want the full path there. Thanks.

  2. #2
    Join Date
    Dec 2005
    Posts
    945

    Re: Hide full path in Windows explorer of mapped drive

    Have you tried to mount the network drives with VBScript, after the mounting you can use the below snippet:

    Code:
    sDrive = "F:\"
    Set oShell = CreateObject("Shell.Application")
    oShell.NameSpace(sDrive).Self.Name = "Data"

  3. #3
    Join Date
    Feb 2006
    Posts
    176

    Re: Hide full path in Windows explorer of mapped drive

    I have never in my life used a vbscript before, and I do not understand what do you mean by mount the network drive with vbsscript? Thanks.

  4. #4
    Join Date
    Nov 2005
    Posts
    609
    I think that you will need a Wscript.Network Object before you call the "mapnetworkdrive" method. Below is the proper syntax:

    Code:
    set objWSHNet = CreateObject("Wscript.Network")
    set objShell = CreateObject("Wscript.Shell")
    strUserName = objShell.ExpandEnvironmentStrings("%username%")
    strCompName = objShell.ExpandEnvironmentStrings("%computername%")
    'Map drive for Username
    objWSHNet.MapNetworkDrive "I:", "\\" & strCompName & "\lotus\" & strUsername
    if err.number=0 then
    sDrive = "I:\"
    Set oShell = CreateObject("Shell.Application")
    oShell.NameSpace(sDrive).Self.Name = "Writeup"
    end if

Similar Threads

  1. Replies: 4
    Last Post: 13-12-2010, 05:34 PM
  2. Windows 7 mapped network drives locking explorer up
    By teena_pansare in forum Operating Systems
    Replies: 5
    Last Post: 06-04-2010, 03:59 PM
  3. Problem accessing DFS link through mapped drive in Windows 7
    By Transporter in forum Networking & Security
    Replies: 5
    Last Post: 25-01-2010, 08:43 PM
  4. Disconnect a network mapped drive in Windows XP
    By Ebadaah in forum Networking & Security
    Replies: 3
    Last Post: 27-07-2009, 01:20 PM
  5. Replies: 3
    Last Post: 08-05-2009, 01:41 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,719,315,482.01365 seconds with 17 queries