[THIN] Re: I need a way to shorten the name displayed on mapped drives

  • From: Brian Smyth <briansmyth@xxxxxxxxx>
  • To: thin@xxxxxxxxxxxxx
  • Date: Fri, 13 Jan 2006 10:03:39 +0000

Well if you use vbscript here is a script to do it

Set WshNetwork = WScript.CreateObject("WScript.Network")
Set WshShell = WScript.CreateObject("WScript.Shell")
Set fs = CreateObject("Scripting.FileSystemObject")




Call MapDrive("Z:", "eire-server6", "ghost", "The Ghost Share")




Private Sub MapDrive( strDrive, strServer, strShare, strDriveName )
  On Error Resume Next
  Dim strPath       'Full path to share
  Dim blnError      'True / False error condition
  blnError = False
  If wshshell.DriveExists(strDrive) = True Then
    WshNetwork.RemoveNetworkDrive strDrive,True , True
  End If
  strPath = "\\" & strServer & "\" & strShare
  WshNetwork.MapNetworkDrive strDrive, strPath                                  
' Maps the Drive
  wshShell.nameSpace(strDrive & "\").Self.name = strDriveName           '
Renames the Drive Letter to make it look more user friendly
End Sub





brian
On 1/13/06, Andy <andysideas@xxxxxxxxx> wrote:
> Umm that utility says only Windows 2000. We have 2003 server sp1
>
>
>
> On 1/13/06, Andy <andysideas@xxxxxxxxx> wrote:
> >
> > Great,
> >
> > That util might work better
> >
> >
> >
> > On 1/13/06, Brian Smyth <briansmyth@xxxxxxxxx > wrote:
> > > Another way is to use this utility
> > >
> > > http://www.loginconsultants.nl/downloads/RenDrv.zip
> > >
> > >
> > > Brian
> > >
> > >
> > >
> > > On 1/13/06, Andy <andysideas@xxxxxxxxx > wrote:
> > > > Thanks.
> > > >
> > > > I am trying to convert this for group policy, so am busy creating an
> adm
> > > > file
> > > >
> > > >
> > > > On 1/13/06, Brian Smyth < briansmyth@xxxxxxxxx> wrote:
> > > > >
> > > > > Here is a sample of kix script to perform this:
> > > > >
> > > > > $RenameDrive =
> > > >
> "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2"
> > > > >
> > > > > use z: \\file01\share$\test
> > > > > writevalue("$RenameDrive\##file01#share$\test",
> > > > "_LabelFromReg", "Test
> > > > > Share", REG_SZ)
> > > > >
> > > > >
> > > > > Hope this helps
> > > > >
> > > > > brian
> > > > >
> > > > >
> > > > > On 1/12/06, Jim Kenzig http://ThinHelp.com <jkenzig@xxxxxxxxx>
> wrote:
> > > > > >
> > > > > >
> > > > > > Try this... from
> > > > > >
> > > >
> http://support.microsoft.com/default.aspx?scid=kb;en-us;330193
> > > > > > To change the so that the drive letter comes first:
> > > > > > (A:) 3 1/2 Floppy
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Click Start, click Run, type regedit, and then click OK.
> > > > > > Locate and then click the following subkey in the registry:
> > > > > >
> > > >
> HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
> > > > > >
> > > > > > On the Edit menu, point to New, and then click DWORD Value.
> > > > > >
> > > > > > Type ShowDriveLettersFirst, and then press ENTER.
> > > > > >
> > > > > > On the Edit menu, click Modify.
> > > > > >
> > > > > > Type 4, and then click OK.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Key: ShowDriveLettersFirst
> > > > > > Type: DWORD
> > > > > > Value: 1,2, or 4
> > > > > > If the value is 1, the drive letter is displayed first for remote
> > > > drives.
> > > > > > If the value is 2, drive letters are not displayed.
> > > > > > If the value is 4, the drive letter is displayed first for all
> drives.
> > > > > >
> > > > > >
> > > > > >
> > > > > > JK
> > > > > >
> > > > > >
> > > > > > ----- Original Message ----
> > > > > > From: Andy < andysideas@xxxxxxxxx>
> > > > > > To: thin@xxxxxxxxxxxxx
> > > > > > Sent: Wednesday, January 11, 2006 6:40:22 PM
> > > > > > Subject: [THIN] I need a way to shorten the name displayed on
> mapped
> > > > drives
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > We are changing from NT4 fat clients over to a 2003 desktop
> > > > > >
> > > > > > In the past NT4 simply display the users home directory as H: in
> MS WORD
> > > > > > open file dialogue box
> > > > > >
> > > > > > On the new Citrix 2003 server WORD now displays
> > > > > >
> > > > > > [username on server H:] in the LOOK IN section of the file
> dialogue.
> > > > > >
> > > > > >
> > > > > > Does anyone know a way I can change this so that is only displays
> H:
> > > > > >
> > > > > > I do love these microsoft 'features'
> > > > >
> > > > >
> > > > > --
> > > > > ***************************************************
> > > > > SBC Technical - Online Server Based Computing Resource
> > > > > http://www.sbctechnical.com
> > > > > mail@xxxxxxxxxxxxxxxx
> > > > >
> ****************************************************
> > > > > ************************************************
> > > > > For Archives, RSS, to Unsubscribe, Subscribe or
> > > > > set Digest or Vacation mode use the below link:
> > > > > //www.freelists.org/list/thin
> > > > > ************************************************
> > > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > ***************************************************
> > > SBC Technical - Online Server Based Computing Resource
> > > http://www.sbctechnical.com
> > > mail@xxxxxxxxxxxxxxxx
> > > ****************************************************
> > > ************************************************
> > > For Archives, RSS, to Unsubscribe, Subscribe or
> > > set Digest or Vacation mode use the below link:
> > > //www.freelists.org/list/thin
> > > ************************************************
> > >
> >
> >
>
>


--
***************************************************
SBC Technical - Online Server Based Computing Resource
http://www.sbctechnical.com
mail@xxxxxxxxxxxxxxxx
****************************************************
************************************************
For Archives, RSS, to Unsubscribe, Subscribe or
set Digest or Vacation mode use the below link:
//www.freelists.org/list/thin
************************************************

Other related posts: