Skip to main content

On Windows 8 or 10, particularly on tablets with a permanently inserted SD card, is there a universal way to treat the card as a non-removable drive?


I have a tablet, a Surface Pro, and I have a micro SD card that is permanently inserted. I use it to store media files like music and video.


Windows, recognizing that it is a removable drive, deletes files immediately instead of putting them into a recycle bin. In addition, applications such as SkyDrive and Dropbox refuse to sync onto the card since it is removable.


I know that formatting the micro SD card NTFS, and mounting it as a folder on the C: drive, enables SkyDrive and Dropbox to sync onto the removable drive, but it doesn't affect file deletion.


I've also heard that various USB drives can be altered to be treated by Windows as non-removable drives by flipping the removable bit. However, this does not appear to be an option for card readers, at least not the one in my Surface.


Is there any way to enable the recycle bin on this drive, and generally make this drive be treated as a non-removable drive?



Answer



I've managed to solve my own problem, but it is not exactly the simplest solution. In a nutshell, instead of storing files on the SD card, which of course Windows sees as a removable drive, it is possible to instead fill the entirety of the SD card with a virtual hard drive, which can then be mounted in Windows, and is treated as an actual hard drive.


Here's what I did on Windows 8.1:


Optional: clear out the contents of your SD card. This is not absolutely necessary, but the amount of free space on the SD card will become the amount of space on your new disk.


Open Disk Management (from my Start menu search, it shows up as "Create and format hard disk partitions").


Optional: ensure that your SD card is formatted to NTFS. As the card will be a permanent fixture and cross-platform compatibility doesn't matter, might as well go with a more modern file system. Furthermore, this wlll enable the next optional step directly below.


Optional (only possible if you chose to format the SD card to NTFS): select the partition on your SD card, and choose "Change Drive Letter and Paths". Remove the drive letter and add a new mount point to an empty NTFS folder. You can stick this somewhere onto your main drive, I chose "C:\Media Container". This way, the SD card won't show up anymore as a separate drive anymore, but can still be accessed by the system for the virtual drive.


Under the Action menu at the top, select "Create VHD". Browse to your SD card location ("C:\Media Container" if you changed its mount point to what I suggested above). Create a VHD here... I called mine "Media Store". I also changed the virtual hard disk format to VHDX for its resilience to power failure events, though I have no actual insight into this beyond what Windows described it as. I stayed with the recommended dynamic expanding disk type, with the thought that this could be useful if I get a bigger SD card in the future.


Right click on the new disk (on the left, now on its partition), and choose initialize. I went with a GPT partition table, as it is a newer design and presumably better, though I have no other insight on this. After it is initialized, right click on the new unallocated partition, and choose "New Simple Volume". Follow the wizard, allocating all space to the new partition, assigning it the drive letter you would like your new hard drive to use (probably D:), and formatting it to NTFS. If all went well, you should now see your new hard drive available in Windows Explorer.


Now, the trick to bring it all together is to set up Windows so that the drive is mounted when the computer boots, as it's no fun having to go into Disk Management each time your computer starts to mount the drive. To do this, you'll need to create a script for mounting it, and then using Task Scheduler to execute the script on boot. I found a really good guide here, which I'll summarize below.


First create a text file wherever you like, named whatever you want - this will become your script. I named mine "Mount Script.txt" and placed it in "C:\Media Container" with my virtual hard drive file. Open it up, and paste in the below, with the path and drive letter edited to match your info:


select vdisk file="C:\Media Container\Media Store.vhdx"
attach vdisk
assign letter=D

Open Task Scheduler under Computer Management, which comes up in my Start Menu as "Schedule tasks". On the right pane, select "Create Task".


The key points are:



  • On the General tab, enter a name of some sort for your task, I called mine "Mount SD card". Under "When running the task, use the following user account", change it to SYSTEM by typing it in the object name box. Also, it may be important to set "Configure for" to your operating system, I'm not really sure and a quick search online didn't really explain what this setting does.

  • On the Triggers tab, click New, and set "Begin the task" to "At startup".

  • On the Actions tab, click New, and set "Program/script" to "diskpart" (without the quotations). Under "Add arguments" paste in the following with the path set to your script's path: /s "C:\Media Container\Mount Script.txt".

  • On the Conditions tab, clear the checkbox for "Start the task only if your computer is on AC power".


You can also go through the options and see if there's anything else you'd like to set, but those should be the essentials.


And that's it! Next time your restart, you should see your storage space on your SD card being mounted as a hard drive.


Comments

Popular Posts

Use Google instead of Bing with Windows 10 search

I want to use Google Chrome and Google search instead of Bing when I search in Windows 10. Google Chrome is launched when I click on web, but it's Bing search. (My default search engine on Google and Edge is http://www.google.com ) I haven't found how to configure that. Someone can help me ? Answer There is no way to change the default in Cortana itself but you can redirect it in Chrome. You said that it opens the results in the Chrome browser but it used Bing search right? There's a Chrome extension now that will redirect Bing to Google, DuckDuckGo, or Yahoo , whichever you prefer. More information on that in the second link.

linux - Using an index to make grep faster?

I find myself grepping the same codebase over and over. While it works great, each command takes about 10 seconds, so I am thinking about ways to make it faster. So can grep use some sort of index? I understand an index probably won't help for complicated regexps, but I use mostly very simple patters. Does an indexer exist for this case? EDIT: I know about ctags and the like, but I would like to do full-text search. Answer what about cscope , does this match your shoes? Allows searching code for: all references to a symbol global definitions functions called by a function functions calling a function text string regular expression pattern a file files including a file

How do I transmit a single hexadecimal value serial data in PuTTY using an Alt code?

I am trying to sent a specific hexadecimal value across a serial COM port using PuTTY. Specifically, I want to send the hex codes 9C, B6, FC, and 8B. I have looked up the Alt codes for these and they are 156, 182, 252, and 139 respectively. However, whenever I input the Alt codes, a preceding hex value of C2 is sent before 9C, B6, and 8B so the values that are sent are C2 9C, C2 B6, and C2 8B. The value for FC is changed to C3 FC. Why are these values being placed before the hex value and why is FC being changed altogether? To me, it seems like there is a problem internally converting the Alt code to hex. Is there a way to directly input hex values without using Alt codes in PuTTY? Answer What you're seeing is just ordinary text character set conversion. As far as PuTTY is concerned, you are typing (and reading) text , not raw binary data, therefore it has to convert the text to bytes in whatever configured character set before sending it over the wire. In other words, when y...

linux - CentOs 7.1 - Install Tomcat 8

I am using this tutorial as a setup reference to getting a Tomcat 8 running on CentOs 7.1 , but after typing: [root@localhost tomcat]# sudo systemctl start tomcat I get the error: Job for tomcat.service failed. See 'systemctl status tomcat.service' and 'journalctl -xn' for details. systemctl status tomcat.service prints the following: [root@localhost tomcat]# systemctl status tomcat.service tomcat.service - Apache Tomcat Web Application Container Loaded: loaded (/etc/systemd/system/tomcat.service; disabled) Active: failed (Result: exit-code) since Wed 2015-11-25 16:54:33 CET; 1min 19s ago Process: 45873 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=203/EXEC) Nov 25 16:54:33 localhost.localdomain systemd[1]: Starting Apache Tomcat Web Application Container... Nov 25 16:54:33 localhost.localdomain systemd[1]: tomcat.service: control process exited, code=exited status=203 Nov 25 16:54:33 localhost.localdomain systemd[1]: Failed to start Apache Tomcat Web App...