+ Reply to Thread
Results 1 to 5 of 5

Enable / Disable CD-ROM thru VB

Hybrid View

Lochdanon Enable / Disable CD-ROM thru... 07-23-2007, 02:24 AM
Macdave_19 Re: Enable / Disable CD-ROM... 04-02-2009, 08:09 AM
Kenneth Hobson Re: Enable / Disable CD-ROM... 04-02-2009, 09:12 AM
martindwilson Re: Enable / Disable CD-ROM... 04-02-2009, 09:48 AM
Kenneth Hobson Re: Enable / Disable CD-ROM... 04-02-2009, 10:43 AM
  1. #1
    Registered User
    Join Date
    07-23-2007
    Posts
    4

    Question Enable / Disable CD-ROM thru VB

    Hi Guys,

    I have been struggling with this problem for a while and have used external programs to complete this task in the past, but it is getting tedious and I have forgotten in the past. I would like to have a button that enables / disables the CD drive so that data can be written to the cd. The reason is that I have multiple users on one system and I have caught them using the cd drive for movies ... not movies that you want customers to see.

    The spread sheet that I use is mainly password protected from them - they just enter sales data, but I need to be able to enable the drive on the system, write data for the week and then disable the drive staright afterward.
    Is this possible? I have seen a 'joke' on other forums (maybe this one) that will open the drive door, but I feel that this may be beyond my programming skills to complete the enable/disable feature.

    Any help would be appreciated

    Thanks

  2. #2
    Valued Forum Contributor Macdave_19's Avatar
    Join Date
    03-14-2007
    Location
    Birmingham, England
    MS-Off Ver
    12.0
    Posts
    808

    Re: Enable / Disable CD-ROM thru VB

    Hi Buddy,

    I don't know the answer to your question however this code opens the drive so perhaps it's a starting point for you

    i hope it helps

    let me know

    Declare Sub mciSendStringA Lib "winmm.dll" (ByVal lpstrCommand As String, _
        ByVal lpstrReturnString As Any, ByVal uReturnLength As Long, _
        ByVal hwndCallback As Long)
    
    Sub OpenTray()
        mciSendStringA "Set CDAudio Door Open", 0&, 0, 0
    End Sub
    Mr MaGoo
    Magoo.Inc MMVII

    If i've helped please add to my Rep by Clicking on the Blue Scales in the top right hand corner of the post

  3. #3
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Enable / Disable CD-ROM thru VB

    The only way I know would be to set it via code and then reboot. This would not be feasible though since you would want to enable it without rebooting I would think.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Enable / Disable CD-ROM thru VB

    probably do-able by group policy in windows, perhaps preventing certain file extensions being used, but i'm not about to delve into mine to find out!
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Enable / Disable CD-ROM thru VB

    If the users want to view racy magazines, as a manager, I see no difference. Standard disciplinary actions would be the same. We have a computer use Policy.

    If you have an abuser and you don't want to fire them, then I guess you could disable it in the bios or use a program like this one.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1