Internett: www.wis.no E-post: wis@wis.no
Tlf: 7245 0190 Fax: 7245 0191

Startsiden | Produkter | Drift | Markedsføring | Ta kontakt | Gå til
Søk:
Logg innLogg inn 

WIS blogg


Rename substed drives
Av: Ove Halseth Torsdag 26.02.2009 (15:29)

On our server we have split our disks into:

C: System disk

D: Data disk

E: Archive

T: Temp

 

In addition we have a fewsubsted drives, both substed to a folder in D:\...:

I: Common

H: Home

 

And a few mapped network drives:

W: Webserver

X: Appserver

 

My "problem" is that I relate much more to drive letters than to drive names, so

I've found that I could rename mapped network drives in scripting, but for long not my substed drives

It always comes up as Data (I:). The same name as my physical D: drive

 

Then I found a comment on this article:

http://www.digwin.com/cant-rename-subst-drive-in-ultimate-32bit

And it turns out that you can only rename substed drive if the drive you are substing to is not named...

So I deleted the "Data" name on our D: disk so that it comes up as "Local Disk (D:)" and now I can rename my substed drive:-)

 

So my script turned out like this:

 

set WshShell = CreateObject("WScript.Shell")
Set objShell = CreateObject("Shell.Application")

 

WshShell.run "subst I: D:\Data"
WshShell.run "subst H: D:\Home\%Username%"

WshShell.run "net use W: \\5.10.1.2\wis pwd /USER:uname /Persistent:No"

WshShell.run "net use X: \\5.10.1.2\wis pwd /USER:uname /Persistent:No" 

 

objShell.NameSpace("E:").Self.Name = "E: Archive"
objShell.NameSpace("I:").Self.Name = "I: Common"
objShell.NameSpace("H:").Self.Name = "H: Home"
objShell.NameSpace("T:").Self.Name = "T: Temp"
objShell.NameSpace("W:").Self.Name = "W: Webserver"
objShell.NameSpace("X:").Self.Name = "X: Appserver"

--Emner: Servere, Windows
Kommentarer: 0


 
 Nye poster
Fixing missing (30.05.2012)
Redirect dll us (30.05.2012)
Laste ned passo (11.05.2012)
Bare si "Nei ti (12.12.2011)
Posten er slett (16.11.2011)
 Søk
 
 Populære emner
Access  Ajax  Ansatte  Brannmur  Database/SQL  Debugging  Delphi  FortiClient  Fortigate  GSI  Hjemmet  Html  Internett  iPhone  iPhone Apps  Java  JavaScript  JVM  Nerdehumor  Nettverk  Operativsystem  Palm  Servere  Skrivere  Sybase  Utvikling  VBA  Vista  VPN  Web 2.0  Windows  WinXP  WIS  Wis Tiltak  WisWeb 1  WisWeb 2  Word  XML
 Vis måned
Mai 2012 (3)
Desember 2011 (1)
November 2011 (1)
September 2011 (2)
August 2011 (1)
 Vis fra forfatter
Ove Halseth (46)
Dag Waade (9)
Stig Runar Vangen (7)
Svein Waade (6)
Inge Valaas (1)
Inger Berg (1)
Kristian Ljøkelsøy Vitsø (1)