Month: April 2010

Turn NUM Lock On/Off from Script

Create a NUM.vbs file that have the below content:

Set objShell = CreateObject("WScript.Shell")
objShell.SendKeys "{NUMLOCK}"

Calling the script will alter the status of NUM Lock.

Tags: ,

Powered by Qumana

Advertisements

Eject CD drive Script

Open the notepad, Past the code below, and save the file as EjectCD.vbs

‘do

set oWMP = CreateObject("wmplayer.ocx.7")
set colCDROMS = OWMP.cdromCollection
if colCDROMS.count >= 1 then
for i = 0 to colCDROMS.Count – 1
colCDROMS.item(i).eject
next ‘ cdrom
end If

‘loop

Double-Clicking the EjectCD.vbs or calling it from a batch should open your CD drives

Tags: ,

Powered by Qumana