Bastian_W Posted June 24, 2004 Share Posted June 24, 2004 Hi,I search for a soulution where I can eject my CD-ROM Drive when the unattended CD is finished... I searched the web, but I don´t found anything. I Tryed a Dos-Tool called: "fxeject" but it needed MSCDEX.EXE be loaded.Have anyone a soulution for this?Edit found this code (its ActiveVB) but I don´t can compile it :'Dieser Source stammt von http://www.activevb.de'und kann frei verwendet werden. Für eventuelle Schäden'wird nicht gehaftet.'Um Fehler oder Fragen zu klären, nutzen Sie bitte unser Forum.'Ansonsten viel Spaß und Erfolg mit diesem Source!'------------- Anfang Projektdatei Project1.vbp -------------'--------- Anfang Formular "Form1" alias FORM1.FRM ---------' Steuerelement: Schaltfläche "Command2"' Steuerelement: Schaltfläche "Command1"Option Explicit'Deklaration: Globale Form API-FunktionenPrivate Declare Function mciExecute Lib "winmm.dll" (ByVal _lpstrCommand As String) As LongPrivate Sub Command1_Click() 'Laufwerkstür öffnen Call mciExecute("Set CDaudio door open")End SubPrivate Sub Command2_Click() 'Laufwerkstür schließen Call mciExecute("Set CDaudio door closed")End SubPrivate Sub Form_Load() 'Control-Eigenschaften initialisieren Command1.Caption = "Auf" Command2.Caption = "Zu"End Sub'---------- Ende Formular "Form1" alias FORM1.FRM ----------'-------------- Ende Projektdatei Project1.vbp -------------- Link to comment Share on other sites More sharing options...
chris40k Posted June 24, 2004 Share Posted June 24, 2004 take a look :http://www.msfn.org/board/index.php?showto...++with++program Link to comment Share on other sites More sharing options...
Bastian_W Posted June 24, 2004 Author Share Posted June 24, 2004 Nice thx... I searched for eject but don´t have found anything... Link to comment Share on other sites More sharing options...
ME2U Posted June 24, 2004 Share Posted June 24, 2004 From Webmedic's post on 2 CD Installation, create a vbs script as follows;Set oWMP = CreateObject("WMPlayer.OCX.7" )Set colCDROMs = oWMP.cdromCollectionif colCDROMs.Count >= 1 then For i = 0 to colCDROMs.Count - 1 colCDROMs.Item(i).Eject Next ' cdromEnd IfThen save this as "CDEJECT.VBS", or any name with VBS extension. You can the just doubleclick or run the vbs script to eject your CD. Link to comment Share on other sites More sharing options...
GreenMachine Posted June 24, 2004 Share Posted June 24, 2004 http://unattended.msfn.org/xp/downloads.htm Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now