Absent removable media causes popup

When I try to scan the root directory of some removable media drive I get a popup (twice ;) alerting me to the fact that the disk is not in the drive. This happens before my code returns from the listFiles() or similar method.
For a kind of batch job I'd like to avoid this - else the job would require user intervention to run to completion. How should I go about it? Found nothing in API docs and Harold's book on I/O. Also in the archives here the question popped up in September 2000 but the "user intervention" problem remained basically unadressed. Thanks for any suggests.

I believe I asked this same question, and it might even be the one from Sept. 2000. I can't find that thread either. (I actually think it was my first post to the forum.)
I had the problem that Windows popped up a message dialog when my floppy drive was empty whenever I tried any "java" way of seeing whether it was empty.
The solution that someone posted was to use Runtime.exec to perform a 'dir' command on that drive root directory, and then attempt to read from the process's input stream. If the drive is empty then the 'dir' command will have no stdout (only stderr) and if the drive is "dir-able" then 'dir' will have no stderr (only stdout). AND that pesky dialog does not appear!
Brilliant solution that worked exactly as I wanted. Sorry I can't remember who provided the solution to give credit. Was it DrClap?
/Mel

Similar Messages

  • Stability of Removable Media support in Linux?

    Hey all, I'd previously thought support for removable media in linux was very good, and everthing I've used has been detected and mounted correctly and such, however I have experienced some corruption on them, especially on my microSD, as I've recently lost a few photos.
    I'm wondering the current status of the support in linux, is it stable, are there any problems, or is it my configuration?
    I use Thunar+Hal to manage my removable media.
    Thanks

    I have found one "odd" issue with Linux: sometimes it delays writing to some external usb card readers.  It might be an issue with the reader but it seems absent in XP.  I have a kingston multi card reader.  I started using it to run my live Arch (Chakra-Live) because it was faster than an ide sd card adapter (odd); however, if I saved my overlay, the drive would show little activity while it was using squashfs on the overlay, and right at the end, the reader light would start flashing but the machine would shut down while the light was still going... and it always botched the save and lost data.  It only happened with the external reader; if the card was mounted on the internal reader on my eee-box, or in the ide adapter, it was fine.
    Do make sure you do unmount / safely remove the drive, and maybe wait a few seconds.  I know my sandisk micromate has no light, so there is no way of telling if has stopped or not.

  • How to disable 'Remove Hidden Information' popup when closing PDF in Acrobat X on Mac?

    How do I disable the function that causes the 'Remove Hidden Information' popup when closing PDFs in Acrobat X? I'm using OS X 10.9.4 on a Mac?
    I've searched online and was directed to Preferences>>Security (enhanced) to uncheck 'Unable Enhanced Security', but it wasn't checked.
    This box (see screen shot) opens each time I close a PDF. I'm forced to select an option before closing.
    Please help.
    Thanks.

    Go to the menu Acrobat>Preferences
    In the Preferences window's "Categories" pane, select "Document"
    In the "Hidden Information" section deselect both check boxes
    Click the OK button
    You should be good now.

  • Kingston DataTraveler shown as having removable media.

    I have tried two new Kingston HyperX 3.0 DataTraveler DTHX30/256GB USB Flash drives in my Lenovo T500 2081 with Windows 7 Professional 64-bit, but both show up in Explorer and Storage Disk Management as a device with removable media--as opposed to being a removable drive. It therefore has 0 capacity and cannot be accessed for reading or writing, nor formatting. I have checked that I have the latest Microsoft and Lenovo drivers, but nothing I have tried or that has been suggested by Kingston or other sources fixes this issue. The DTHX30/256GB works fine on computers with Windows 7 32-bit and Windows XP, just not on my Lenovo T500. I have used Diskpart on another computer to clean, partition, and reformat the DTHX30/256GB without any affect on how the T500 sees the drive. I also used a software utility on another computer to "flip" the removable bit without apparent affect in how the T500 sees the drive. What is causing this issue and how to fix it?

    could you try the testing repo?
    there is the new udev along with new initscripts that should fix it.
    other fix would be to change the udev.rules rule according to this:
    # never access removable ide devices, the drivers are causing event loops on open()
    BUS=="ide", DRIVER!="ide-cdrom", SYSFS{block/removable}="1", GOTO="persistent_end"

  • USB card reader working, but not showing up in removable media... why?

    For some reason lately, my USB mounts, but doesn't show up in the Finder left-hand area with the other removable media, such as DVDs. I have to access it via My Computer, where it does show up. And I have to eject it in Disk Utility.
    It does show up normally in iPhoto.
    Any idea why this might happen?
    Thanks,
    doug

    Welcome! ...I would try Apple's 'Troubleshooting Assistant' first : )
    http://www.apple.com/support/ipod/five_rs/

  • How to catalogue "old" removable media

    Hi, I shoot photos, download them from my SD memory into my hard disk, and import them using LR 1.3.
    Soon my hard disk gets full and so I can export them burning them onto dvds, retaining all related metadata.
    But, what if I want to import from optical media I burned 1 year ago? I have tens of dvd plenty of photos I wished to import in LR, so that in future I could find what I search for using LR good filters.
    I don't want to spend time telling LR where the orphan photos are, I simply want LR to answer me 'this photo was on a removable media named "PHOTOS_13".' when I search for a particular keyword.
    If I don't go wrong, simpler applications like ACDSee or ThumbsPlus allow this...
    Nino

    There isn't a way to do this yet in LR, but it sure has been discussed a lot in this forum. Do a forum search for "offline" to find some of what people have been asking for.

  • Removable media

    For some reason I cannot unmount removable media (in my case a USB flash drive) from Thunar using HAL. I believe it is saying that I do not have permission to unmount it. I've tried putting my user in the groups "hal" and "storage". I can't seem to find a solution.
    What's strange to me is the fact that it unmounts sometimes but other times not...
    Anyone got an idea?

    That sounds right! I feel so stupid, it's just when I seen the word "permission" in the error dialog I thought I didn't have sufficient privelages to unmount the media.
    Thanks.

  • Gnome: Add custom command to Removable Media application

    I'm trying to setup cvlc to run a DVD when inserted into the drive.  I created a cvlc.desktop so it is seen when I go to to the Removable Media menu but it doesn't work because a custom command is required.  How do I configure it so that one can be run?  The cvlc command to run a DVD is:
    cvlc dvd://
    Any ideas?

    Try modify /etc/PolicyKit/PolicyKit.conf as root:
    <match user="$USER">
    <match action="org.freedesktop.hal.storage.*">
    <return result="yes"/>
    </match>
    <match action="hal-storage-mount-fixed-extra-options">
    <return result="yes" />
    </match>
    <match action="hal-storage-mount-removable-extra-options">
    <return result="yes" />
    </match>
    </match>
    Change $USER for your username... then /etc/rc.d/hal restart as root

  • Saving Messages to removable media

    A user has messages that they would like to transfer to CD or USB Memory stick or some other form of removable media. I understand that the messages are wave files, but how do I get access to them so that I can copy over for them!?

    Hi Janis,
    I remembered seeing this thread some time ago. Maybe it will give you what you need. The answer is from Hin@Cisco Systems;
    http://forum.cisco.com/eforum/servlet/NetProf?page=netprof&forum=Unified%20Communications%20and%20Video&topic=Unified%20Communications%20Applications&CommCmd=MB%3Fcmd%3Dpass_through%26location%3Doutline%40%5E1%40%40.1dd9cedd/3#selected_message
    Hope this helps!
    Rob

  • Copy Keychain to Removable Media

    Hello All:
    I wish to 'copy' my Keychain to removable media, just in case something untoward happens. Of course, the backup is in Time Machine, however without another 'Mac' around I cannot access the data. So, I figured I copy Keychain to removable media (iPod Classic set up as hard drive).
    Now, Mac Help says to "Copy your keychain to a location... or copy it to your removable media."
    Great! Now for the daft question: How do I (exactly) copy my keychain to removable media?
    Many, many thanks in advance!

    V.K.:
    Many Thanks for the reply. I should have thought it would be as easy as that. Although you are absolutely right that removable media is no better than a TM back-up, considering I will still need a Mac to access Keychain, it is more useful to me. It is easier to travel with the iPod (Classic) and have the info available than to carry a TM, even if I will need to locate a Mac to access.
    Many thanks again,
    Bill

  • Vold Manager never detects the cd rom and any other removable media

    Hi,
    I have installed solaris 10(i86pc i386 i86pc) on my PC through Oracle Virtual box but I am stucked in a problem that the vold manager never detects the cd rom and any other removable media devices. I have tried many documented methods but could not get solution to this problem. I also stopped the volume manager (vold) and tried to mount the cd rom manually but still could not mount the cd rom.
    I don't know how to configure solaris in such a way that it could detect cd rom and any other removable media.
    Any help in this regard will be highly appreciated.
    Regards,
    Anees

    Is it an IDE or SCSI CD-ROM? Can you post back the output of the following command?
    ls -l /dev/dsk/c*

  • Windows 7 GPO - Disable All Removable Media then Re-enable, now CD/DVD drive is inaccessible

    Ok, this might be better placed in the Windows 7 forum, but we're having some issues with limiting access to removable media via GPO.
    We've set up a GPO for Computer Policy, Admin Templates, System, Removable Storage Access, All Removable Storage classes: Deny all access - Enabled
    After finding that this was a bit too restrictive we reset it back to Not Configured (and later Disabled to try and force it) but it seems to break our DVD drives on all Win7 x64 machines (the gpo is limited to apply only to these machines).  Instead
    of the usual icon in my computer it shows a description of the CD/DVD in the drive and the usual "unknown file type" icon.  if you take the cd out it shows the usual cd rom icon, but still gives "access denied"
    There is one workaround, and that is to set the GPO back to not configured and manually remove the CD/DVD device via device manager, restart, and allow windows to re-install the device drivers.
    This is 100% repeatable by applying the same local computer policy (All Removable Storage classes: Deny all access - Enabled" and restarting the machine. 
    Has anyone else run into this problem before?  And how can we fix it without having to go to every machine to remove the DVD drive from device manager? 
    Thanks,
    -Nick

    Hi,
    after looking on many pages for a solution i always found the same workarounds - but for me deleting the device is no option because you aren't allowed to delete devices without administrative rights. Also I can't expect that our users always have to reinstall
    the device.
    So i analyzed whats going on in the registry when the key "Deny_All" for blocking RemovableStorageAccess is set to 1 - with the running of gpupdate i realized that Windows is writing a registry key to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE\Device\
    named "security". The problem is that windows doesn't delete this key after setting the key "Deny_All" back to 0. Only sometimes it will be deleted, for example when you apply the policy for blocking devices and reverse this setting immediatly without a restart
    of windows.
    I made a little script which I integrated in the user-gpo (as logon script) for granting access to the removable storage devices:
    '****SCRIPT START****
    ' this script searches for all "security"-keys under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE\ and deletes them
    Option Explicit
    Const HKEY_LOCAL_MACHINE = &H80000002
    Dim oReg : Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
    Dim oShell : Set oShell = CreateObject("WScript.Shell")
    Dim sPath, aSub, sKey, aSubToo, sKeyToo, dwValue
    ' Get all keys within sPath
    sPath = "SYSTEM\CurrentControlSet\Enum\IDE"
    oReg.EnumKey HKEY_LOCAL_MACHINE, sPath, aSub
    ' Loop through each key
    For Each sKey In aSub
        'Get all subkeys within the key 'sKey'
        oReg.EnumKey HKEY_LOCAL_MACHINE, sPath & "\" & sKey, aSubToo
        For Each sKeyToo In aSubToo
            oReg.deleteValue HKEY_LOCAL_MACHINE, sPath & "\" & sKey & "\" & sKeyToo , "Security"
            if Err.Number<>0 then
                Err.Clear
            end if
        Next
    Next
    '****SCRIPT END****
    The policy for giving access to removable storage looks like this now:
    - a logon script is executed which searches for all "security"-keys under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE\ and deletes them
    - the setting "All Removable Storage classes: Deny all access" ist set to "Disabled"
    I hope this helps...
    Regards
    Swanson

  • Existing tools to develop mobile applications( mobile,pda,removable media)

    hi java developers,
    could anyone answer the question that are asked below
    1) what are the existing tools to develop mobile based applications( ex: mobiles, pda , laptop, pocket pc's,smart phones, and removable media )
    2)what are the encryption methods present& how to secure communication of files and documents?
    awaiting for reply...
    thanking you,
    vemuri...

    this reply is based on what I know,
    for mobile I use : Sun's Wireless toolkit , netbeans with mobility pack (best acc ording to me).
    for secure data communication: you can use secure server and client sockets, by which you can make your files and documents travel securely between client and server in encrypted form using the personal and public keys.

  • Space Issues w/ Removable Media

    I notice when I save a 4 GB file to my USB removable thumb drive and then delete the file, it's not actually deleted but dumped in a .Trash folder. This is very annoying because when I then look and see there are no visible contents in the drive, I get errors saying the file I am trying to save is too large or the disk is out of space. How can I make sure when I remove / delete a file from my USB thumb drives, it doesn't move it or cache it in .Trash or any specific place on the removable media?

    Carlwill wrote:I notice when I save a 4 GB file to my USB removable thumb drive and then delete the file, it's not actually deleted but dumped in a .Trash folder. This is very annoying because when I then look and see there are no visible contents in the drive, I get errors saying the file I am trying to save is too large or the disk is out of space. How can I make sure when I remove / delete a file from my USB thumb drives, it doesn't move it or cache it in .Trash or any specific place on the removable media?
    How are you deleting that file? Do you run 'rm some_file' from the commandline?

  • Searching Removable Media

    Hey everyone,
    I seem to be having a problem searching removable media. I open an SD card from a camera that contains a top level folder called DCIM and numerous subfolders called 100Nikon, 101Nikon, and on down the line for like twenty folders. Inside are various jpegs and avi's.
    I wanted to do a search for the AVI's so I could copy and watch them. I found that finder was unable to find them no matter what criteria I used. I then found it was unable to find either the DCIM or the various Nikon folders either. Finder has no problem finding any of those types of items in folders on my hard drive or on my firewire hard drive, but it refuses to find anything at all on the SD card. Is this normal behavior?

    Problem (finally) found and fixed!
    There is apparently an issue with the application of the group policies under User Configuration/Policies/Administrative Templates/System/Removable Storage Access on Windows 8.
    These policies basically restrict access to removable storage like SD cards and USB sticks (i.e. policies enabled = access restricted).
    If they are simply enabled or disabled once by a single group policy, there is no issue.
    However, if they are e.g. enabled by an overall domain standards policy (i.e. access restricted) and then disabled by a separate corporate policy overrides policy (i.e. access unrestricted) for specific users - as good practices dictate -, there is an issue
    on Windows 8 (not Windows 7 or Windows XP).
    That means if one wishes to restrict removable storage access overall on Windows 8, but still allow it for specific users, one should not enable these policies overall (access restricted) and disable them for specific users (access unrestricted) - which requires
    2 separate group policy objects -, but rather leave these policies disabled overall (access unrestricted) and only enable them for those users whose removable storage access should be restricted (access restricted), even if they are the rule and not the exception
    - which only require 1 single group policy object, since these policies are already disabled (technically "not configured") by default.
    Hope this makes sense and someone at Microsoft reads this!
    Thank you everyone anyway!

Maybe you are looking for

  • I need a vi converted from LabVIEW 9.0 to 8.6 or 7.1

    I have a few vis that need to be saved to an earlier version. These are in version 9.0 and I need them in 8.6 to open them. It would be better if I could get them in 7.1. Solved! Go to Solution. Attachments: Grab_continuously_new.vi ‏380 KB Mikrotron

  • Open in New Page

    Hi all, I'm using OBN between two DB Querys. anybody know, how can I do to call the target in a external Windows ? Regards.

  • Failure negotiating credentials from MAC-OSX for RemoteDesktop

    The remotedesktop client was working fine on my Mac before I upgraded to OSX Maverix. Following the upgrade to OSX, it stopped working. So upgraded to  Version 8.0.24308 which is the latest available version. At this point, remote-desktop fails in th

  • Including HTML pages

    Hi there. I'm new to Flash but I've been working on a website that came from a Flash template. Half of the pages are in Flash, the other half are HTML (done in Dreamweaver). Is there some way I can call out to the HTML pages and include them into the

  • Cant download mavericks from apple store

    I have a macbook pro mid 2009 and I'm running OS X Lion 10.7.5.  I tried to download on the 23rd, it just sat there for two hours doing nothing.  I had to quit.  Now it wont install.  It shows up in purchases as "download"  It wont.  I cant delete, c