I would like to have a script find the first available cdrom and set it to drive e:
here is some code that will show cdrom devices drive letters but I can't figure out to actually change it.
Const DriveTypeCDROM = 4
Set oFS = Wscript.CreateObject("Scripting.FileSystemObject")
Set oDrives = oFS.Drives 'Loop thru A-Z. If found, exit early.
For Each Drive in oDrives
If Drive.DriveType = DriveTypeCDROM Then
Wscript.Echo Drive.DriveLetter
End If
Next
If you have advice please share.
thanks!!
- Jaws25
here is some code that will show cdrom devices drive letters but I can't figure out to actually change it.
Const DriveTypeCDROM = 4
Set oFS = Wscript.CreateObject("Scripting.FileSystemObject")
Set oDrives = oFS.Drives 'Loop thru A-Z. If found, exit early.
For Each Drive in oDrives
If Drive.DriveType = DriveTypeCDROM Then
Wscript.Echo Drive.DriveLetter
End If
Next
If you have advice please share.
thanks!!
- Jaws25