Is anybody any good at these types of scripts.. (Batch Script or VB Script) I think the latter will only work for this
What I wan't to do is make a script that will change the drive letter of the hard drive in which the script file is located to Z:
The reason I want to do this is because I want to backup my library on to an external hard drive but on this hard drive I also want a portable installation of MC.. I wish to set the directory to Z so that is never conflicts with anything on any other computer system.. This would allow me to take my library and use it on other peoples computers when I am away... Having this script would make it painless to change to drive letter of my external hard drive when I plug it into different computers. I wouldn't have to waffle thought the computer management console every time, just a nice double click on my script file and away I go... Hopefully..
After some Goolgling, I've found some code that shoud do the trick, I just need some help to alter it
Changing the Drive Letter of a Volume
Changes the drive letter of volume D to Q. If you modify this script to change the drive letter of a volume other than D, note that the volume name in the WQL query must include both the colon ( : ) and two forward slashes (\\). Thus drive C would look like this: C:\\. When specifying the new drive letter, however, you only have to include the colon (in the sample script, Q:).
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colVolumes = objWMIService.ExecQuery _
("Select * from Win32_Volume Where Name = 'D:\\'")
For Each objVolume in colVolumes
objVolume.DriveLetter = "Q:"
objVolume.Put_
Next
I think the above code just needs altered.. How do you use Vbscript to call on the currect drive letter in which the file is excecuted?? If that can be placed in a variable in the top.. I can then just replace the D:\\ in
("Select * from Win32_Volume Where Name = 'D:\\'")
with the variable that calls on the current drive letter..
Thanks