About · Site feedback
welcome  Products  Scripts  Downloads  Forum  Contact us  Support  Resellers 
Visual Basic
External downloads
If you use WSH or just VBScript / JScript, then the most important download to have is the Windows script host documentation (version 5.6).
Legal information
End User License Agreement
Non-commercial license
Disclaimer and legal notice

HotKey QL VB scripts


Eject a CD/DVD (or any removable) drive

Set WshShell = CreateObject("WScript.Shell")
' Eject the F drive
strRun = "EjectDrive.exe f"
' Run the eject application
call WshShell.run(strRun)


Load a CD/DVD (or any removable) drive

Set WshShell = CreateObject("WScript.Shell")
' Load the F drive
strRun = "EjectDrive.exe /l f"
' Run the eject application
call WshShell.run(strRun)
 Download the EjectDrive.exe application

Eject the current CD in drive F

' Eject all CD/DVD drives
Eject "F:\\"
Sub Eject(CDROM)
Dim ssfDrives
ssfDrives = 17
End Sub

Mount an ISO image (requires Disc Image Pro)

Set WshShell = CreateObject("WScript.Shell")
' Mount an image
strRun = "ImageMount.exe /Q /M c:\image.iso"
' Run the mount application
call WshShell.run(strRun)

Find out which letter the CD Rom drive is on

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

Find out the CD/DVD drive information

On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_CDROMDrive")
For Each objItem in colItems

strmsg=strmsg&"Description: " & objItem.Description&vbcrlf
strmsg=strmsg&"Drive: " & objItem.Drive&vbcrlf
strmsg=strmsg&"Manufacturer: " & objItem.Manufacturer&vbcrlf
strmsg=strmsg&"Media Loaded: " & objItem.MediaLoaded&vbcrlf

wscript.echo strmsg

Close the top window

Dim oWSHShell
Set oWSHShell = WScript.CreateObject("WScript.Shell")
WScript.Sleep 100
oWSHShell.SendKeys "%{F4}"    'Send ALT+F4 to close the window
Set oWSHShell = Nothing
MsgBox "Closed the window"    ' Just for debugging
Rate this page




QS Disclaimer 4.4.15 is now available. This version adds the option to copy images when using the remote manager and a web interface. Also adds Exchange 2016 support.

RTF to HTML converter 1.2.11 is now available. This version fixes a colour table issue.

ID3 Editor 1.23.34 is now available. This version adds multiple defaults and fixes issues with El Capitan and Sierra.

MSAD Login 3.1.0 is now available. This version includes TLS and Kerberos support.

Archive SE 1.1.5 is now available. This upgrade adds support for Tar and BZip2.

back to top  

Facebook  Twitter  Google+ 

Copyright 1990-2017 Pa-software. All Rights Reserved.
Developer of Exchange Server e-mail disclaimers, compression, ISO CD/DVD disc image management, MP3 ID3 editing and Macintosh Active Directory integration.