Windows uses 20gb, then you take the 10GB used for file system pointers, install chrome, firefox, eclipse, and visual studio and the space is basically gone. But wait there is an microsd slot! However, Windows can’t move my libraries to the sd card, then I noticed that some programs won’t install to an sd card, and the deal breaker, Dropbox won’t sync to an sd card. The solution is to create a Virtual hard disk, VHD, and store that on the microsd card and point everything to the VHD.
I wanted a really light and portable computer that I could use in company meetings for notes, traveling, and general web browsing. I also wanted this machine to be able to compile my software projects and be useful for coding. Finally, as a guy who loves technology and wants everything, but can’t afford it, the device needs to be a reasonable price. I went with the [Asus VivioTab Note 8 64GB](). I upgraded to Windows 10 and ran the disk cleanup utility, installed some programs and most of the hard drive was gone. I created a Virtual Hard Drive, VHD, and put that on the microsd card and then had all the programs point to the new VHD. Programs and the OS treat the VHD as a permanent hard drive.
The Plan
- Create A VHD and save it to the Micro/SD Card/USB
- Create Directories for your libraries
- Configure the libraries
- Enable Indexing on the VHD
- Auto Mount the VHD on system boot
Creating the VHD
- Open Disk Management (right click the start menu icon, select disk management)
- Click Action
- Click Create VHD
- In the location field Browse to the Micro/SD card/usb and name the VHD file whatever you like
- Allocate as much storage as you think you will need. (I did the full size of the microsd – 5gb)
- You can use either fixed or dynamically expanding (I used dynamically expanding)
- Click OK
- Find the new disk in the lower panel of Disk Management, should be disk 2
- right click the left box and select “Initialize Disk”
- Click OK
- Right Click the right part where it says “Unallocated”
- Click “New Simple Volume”
- Leave it as GPT, Click next, name it whatever you want, click next
- Select any available drive letter, click next
- click Finish
Create/Configure Library Directories – Optional
- Open File Explorer
- In the Navigation pane, scroll down to the “Libraries” folder
- Single click Documents
- Select the “Manage” Tab in the ribbon bar
- Click “Manage Library”
- Click “Add”
- Browse to the new VHD that you mounted
- Click “New Folder”
- Give it a name (I used “Documents”)
- DO NOT OPEN the folder, just select it and click “Include folder”
- Remove the Default Personal Folder
- Click OK
- Click “Set save Location”
- Select the newly created folder
- Done
- Repeat for each library as needed (Music, Pictures, Videos, etc)
Enable Indexing on VHD – Required
- Open Windows Search (win+s) keys or “Charms Menu” or Cortana
- Type “Indexing Options” and Open
- Click “Modify”
- Select the new VHD you created
- Click OK
- Click Close
The AutoMount Script
- Open windows Powershell as an Administrator (right click and run as administrator)
- Type
Set-ExecutionPolicy RemoteSigned
- Press Enter
- Type
Y
- Press Enter
- Open File Explorer
- Open the C: drive
- Create a folder named something like “VHD_MOUNT” or “MOUNT_SCRIPT” or anything that helps you identify that the script will be saved here
- Open the folder
- In the ribbon bar go to the view tab and check “File name extensions”
- Right click the white space New->Text Document
- Name it Auto-Mount.ps1
- Accept the file name extension change
- Paste the following, remember to Change D to the drive letter of your micro/sd card/usb and use the full path to your VHD file
"Mount-DiskImage D:\YourVHD.vhd"
- Save and close
- Open Windows Search (win+s) keys or “Charms Menu” or Cortana
- Type “Task Scheduler” and open it
- In the left pane select “Task Scheduler Library”
- In the Action menu select Create Task
- General Tab
- Name: Attach VHD
- Location: \
- Description: AutoMount script for the Micro/SD card/ USB VHD
- “Click change user or Group” Type in System in the bottom box and hit check names
- Check “Run with highest privileges”
- Triggers Tab
- Click New
- Begin the task “At Startup”
- Click OK
- Action Tab
- Action: Start a program
- Program/script:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
- Add Arguments:
"C:\<your folder>\Auto-Mount.ps1"
- Click OK
- Conditions Tab
- Under Power uncheck “start the task only if the computer is on AC Power”
- Click OK
Test
Restart your computer and see if the drive auto mounts. If you set up the libraries, take a few pictures and see if they are indexed properly by showing up in the gallery. Add some music and see if it shows up in the music app, etc etc. If you have dropbox already installed you can goto Dropbox preferences -> Account and hit the move button and select the new VHD. Dropbox will do the rest.