Westi Posted October 24, 2003 Share Posted October 24, 2003 is there a command that can use the cd rom name itself eg WINXP_SP1 then it would matter what drive letter it would be.Create a vbs file and write in:Set WshShell = WScript.CreateObject("WScript.Shell")Set fso = CreateObject("Scripting.FileSystemObject")Dim sCall ChCD(D:\)Call ChCD(E:\)Call ChCD(F:\)Call ChCD(G:\)Call ChCD(H:\)Call ChCD(I:\)Call ChCD(J:\)Call ChCD(K:\)Call ChCD(L:\)...WshShell.MsgBox "CDROM Letter is " & s...Wscript.QuitFunction ChCD(DriveN) Set d = fso.GetDrive(DriveN) If d.IsReady And d.DriveType = 4 And d.VolumeName = "WINXP_SP1 " Then s = DriveNEnd FunctionThis checks for - drive ready?- drive type CDROM- Volume name Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now