Jump to content

CDROM Tray Lock


dminion
 Share

Recommended Posts

well this may not help but all i can think of is using a while loop and checking if it's open and if it is then close it...

--probably being usless ~cdkid

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Link to comment
Share on other sites

Yes you just has to use the MS mesie player activex component like in this example...

; Author:   Kåre Johansson
; AutoIt Version: 3.1.1.104
; Description: Very Simple component example: Open and close all CDROM / DVD drives
; Date: 27 Jan 2006

$oRP = ObjCreate("WMPlayer.OCX")

$cdroms = $oRP.cdromCollection
With $cdroms; Object tag pool
For $b = 1 To 10
    If .Count > 0 Then 
        For $a = 0 TO .Count - 1
            .Item($a).Eject
        Next
    EndIf

Sleep(3000)
If .Count > 0 Then 
        For $a = 0 TO .Count - 1
            .Item($a).Eject
        Next
EndIf
Next
EndWith 
$oRP = 0    
Exit

Simple as that...

kjactive :lmao:

Edited by kjactive
Link to comment
Share on other sites

Yes you just has to use the MS mesie player activex component like in this example...

; Author:   Kåre Johansson
; AutoIt Version: 3.1.1.104
; Description: Very Simple component example: Open and close all CDROM / DVD drives
; Date: 27 Jan 2006

$oRP = ObjCreate("WMPlayer.OCX")

$cdroms = $oRP.cdromCollection
With $cdroms; Object tag pool
For $b = 1 To 10
    If .Count > 0 Then 
        For $a = 0 TO .Count - 1
            .Item($a).Eject
        Next
    EndIf

Sleep(3000)
If .Count > 0 Then 
        For $a = 0 TO .Count - 1
            .Item($a).Eject
        Next
EndIf
Next
EndWith 
$oRP = 0    
Exit

Simple as that...

kjactive :lmao:

I'm not sure I follow... how exactly will this lock the drive tray? It looks like it just opens and closes drive trays...

Thanks,

dminion

Link to comment
Share on other sites

http://people.eku.edu/gumpp/AutoIt/cdtool.exe

;Usage:

Run("cdtool.exe Lock E:")

Run("cdtool.exe Unlock E:")

It doesn't do any input validation so make sure the drive letter is valid....

Also, if you end up calling LOCK many times on the same drive, you will need to call UNLOCK that many times....

Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

  • 2 months later...
  • 9 months later...

you said "I've looked around and have only found ways to do it in VB."

So, show us what you have found, and we can probably convert it.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...