About · Site feedback
welcome  Products  Scripts  Downloads  Forum  Contact us  Support  Resellers 
 
Scripts
 
PHP
JavaScript
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
CreateObject("Shell.Application")_
.Namespace(ssfDrives).ParseName(CDROM).InvokeVerb("E&ject")
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
Next
 

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=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
Next
 

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

Products

 

News

QS Disclaimer 4.5.16 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.

Disc Image Professional 2.3.1 is now available. This upgrade adds multi-user support and fixes a Vista mount issue.

ID3 Editor 1.24.38 is now available. This version fixes issues with the CLI and adds support for non-standard fields.

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

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.