Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Drive name

Status
Not open for further replies.

Crazy321

Programmer
Oct 15, 2003
7
BE
How can you change the name of Local Drive in vbscript.
I have a script that creates a Network Drive but I would like to change the name.

The thing i would like to accomplish is instead of "mapname on computername" to for exemple "Files"

Greets Crazy
 
Provided you use WindowsXP you can try this:
Code:
a="\\Server\SharedFolder"
b=UCase(Replace(a,"\","#")
c="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer"
c=c & "\MountPoints2\" & b & "\_LabelFromReg"
Set S=WScript.CreateObject("WScript.Shell")
S.RegWrite c, "Files", "REG_SZ"

Hope This Help
PH.
 
Thanks, it works fine on my XP, but not on my Win2000 Server. I gte the textfiles, but they are all empty..
srvinfo.exe are located on that box, and works fine if I execute it locally.. Any idea???
 
dukkse, I guess your asking is for another thread...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top