(view source code of cdrom.kix as plain text)
Break On
$KixMajorVer = SubStr( @Kix, 1, InStr( @Kix, "." ) - 1 )
If $KixMajorVer < 4
GoTo Syntax
EndIf
$Drives = GetObject("winmgmts:").ExecQuery("select Name,DriveType from Win32_LogicalDisk where DriveType = 5")
If @Error <> 0
? @Error + " / " @SError
Else
For Each $Drive In $Drives
$Count = 1 + $Count
$CDROM = "$CDROM " + $Drive.Name
Next
$CDROM = Right( $CDROM, Len( $CDROM ) - 1 )
If $Count > 1
$Drv = "drives"
Else
$Drv = "drive"
EndIf
? "$Count CD-ROM $Drv found on \\@Wksta: $CDROM"
?
EndIf
Quit 0
:Syntax
? "CDROM.kix, Version 1.10"
? "Display CD-ROM drive letters for the local computer."
?
? "Usage: KIX32 CDROM.KIX"
?
? "Written by Rob van der Woude"
? "http://www.robvanderwoude.com"
? "This is a modified version of the GetDrvs.kix sample"
? "(Copyright (C) 2001 Ruud van Velsen) that comes with KiXtart 4.*"
?
? "This script requires KiXtart 4.00 or later."
? "Your KiXtart version is @Kix"
?
Quit 1
page last modified: 2024-04-16; loaded in 0.0048 seconds