MSFN Forum: Eject CD after Installation - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Eject CD after Installation Howto automaticaly eject CD after.... Rate Topic: -----

#1 User is offline   Bastian_W 

  • Member
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 15-December 03

  Posted 24 June 2004 - 07:35 AM

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-Funktionen
Private Declare Function mciExecute Lib "winmm.dll" (ByVal  _
lpstrCommand As String) As Long

Private Sub Command1_Click()
    'Laufwerkstür öffnen
    Call mciExecute("Set CDaudio door open")
End Sub

Private Sub Command2_Click()
    'Laufwerkstür schließen
    Call mciExecute("Set CDaudio door closed")
End Sub

Private Sub Form_Load()
    'Control-Eigenschaften initialisieren
    Command1.Caption = "Auf"
    Command2.Caption = "Zu"
End Sub
'---------- Ende Formular "Form1" alias FORM1.FRM  ----------
'-------------- Ende Projektdatei Project1.vbp --------------



#2 User is offline   chris40k 

  • Group: Members
  • Posts: 1
  • Joined: 22-June 04

Posted 24 June 2004 - 08:10 AM

take a look :

http://www.msfn.org/board/index.php?showto...++with++program

#3 User is offline   Bastian_W 

  • Member
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 15-December 03

Posted 24 June 2004 - 08:26 AM

Nice thx...

:)


I searched for eject but don´t have found anything...

#4 User is offline   ME2U 

  • Junior
  • Pip
  • Group: Members
  • Posts: 59
  • Joined: 04-February 04

Posted 24 June 2004 - 03:02 PM

From Webmedic's post on 2 CD Installation, create a vbs script as follows;

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

Then 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.

#5 User is offline   GreenMachine 

  • ineXPlicable
  • Group: Developers
  • Posts: 3,062
  • Joined: 22-August 03

Posted 24 June 2004 - 03:30 PM

http://unattended.ms...p/downloads.htm

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy