Yes, my script was giving me my drive letter. but yours said You "have no CD-ROM" I have changed your script to:
For Each objItem in colItems
cdrom= objItem.Drive & ";"
next
if (cdrom <> null) then
cdrom= "No"
else
cdrom= "Yes"
end if
The part I do not understand is where you type "<>...
Thank you for your post.
Actually I have defined objWMIService but this is just a part of my whole script.
I think your script is not correct, If I run it on my Computer it says You have no CD-ROM as I have a CD-ROM drive this is not correct.
So what I'm searching for is something to ad to that...
Hi guys,
I am new here and also new to scripting.
I am searching for a script that determines whether there is a Cd-rom or not
Currently I have this:
Set colItems = objWMIService.ExecQuery _
("Select * from Win32_CDROMDrive")
For Each objItem in colItems
cdrom= objItem.Drive & ";"
next
now...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.