After about a week of excitement and playing around with features, I decided it was time to start optimizing and making this thing run the way I wanted. The first thing I noticed was that I could not use my SD card with my Libraries, so all my apps are going to by default save to the local SSD, which is far from what I want. I knew there had to be a way around this, so I started digging in. I feel I finally have it to the point where others should be doing the same thing, and once done, you can forget about it.
- Create a VHDX and save it on the SD card
- Create directories on this VHD for your specific libraries
- Documents
- Music
- Video
- Pictures
- Configure the libraries
- Enable Indexing on the VHDX – This is important because the Photos app doesn’t work right without it.
- Have a script automatically Attach the VHD on Boot
If you would like to know the exact steps to take, please continue reading.
Creating a VHD
- Open Charms Menu (Swipe in from the right side of the screen)
- Click Settings
- Click Tiles
- Change “Show administrative tools” to Yes
- Swipe from the bottom of the screen
- Click All apps
- Under “Administrative Tools” click Computer Management
- Click “Disk Management”
- Click “Action”
- Click “Create VHD”
- Browse to the SD Card’s storage and name the VHD whatever you want
- Allocate as much of the SD’s storage you want to this VHD,
- You can decide between Fixed or Dynamically expanding. I went with Dynamically expanding.
- Find the newly created disk in the lower panel, which should be “Disk 2”
- Right-click where it says “Disk 2”
- Click “Initialize Disk”
- Click OK
- Right-click “Unallocated”
- Click “New Simple Volume…”
- Click “Next >”
- Click “Next >”
- Select the Drive letter you want (can be anything)
- Click “Next >”
- Name the Volume whatever you want
- Click “Next >”
- Click “Finish”
Create/Configure Library Directories on VHD
- Click the “Libraries” icon from the “Task Bar”
- Single click “Documents”
- Click “Manage under “Library Tools” from the ribbon
- Click “Manage library”
- Click “Add”
- Browse to the newly Attached VHD you just created
- Click “New Folder”
- Name it whatever you want (Eg: Documents)
- DO NOT OPEN THE FOLDER, select the folder and click “Include folder”
- Remove the Default Personal folder
- Click OK
- Click “Set save location”
- Select the newly created folder
- Repeat steps 1-13 for the following
- Music
- Pictures
- Videos
Enable Indexing on VHD – Very Important
- Open the “Charms Menu”
- Click “Search”
- Type “Indexing Options”
- Click Settings
- Open “Indexing Options”
- Click “Modify”
- Select the newly Attached VHD
- Click OK
- Click Close
Create Script to Auto Attach on Startup
- Open PowerShell as an Administrator
- Type “Set-ExecutionPolicy RemoteSigned”
- Press Enter
- Type “y”
- Press Enter
- Click Computer from the navigation bar on the left of the Libraries folder
- Open the C: Drive
- Create a new folder named “PoSH”
- Double click the new folder
- Right-click in the white area and navigate to “New > Text Document”
- Name it Auto-Mount.ps1
- Open the new file with Notepad
- Paste the below code in, don’t forget to modify the red text to the path you saved the VHDX file at
- “Mount-DiskImage D:\YourVHD.vhdx”
- Open the “Charms Menu”
- Click “Search”
- Type “Task Scheduler” and open it
- Click “Task Scheduler Library”
- Click “Action”
- Click “Create Task…”
- General Tab
- Name: Attach SD VHD
- Location: \
- Description: This is the Task that automatically attaches the VHD file on the SD card on system boot.
- “Click Change User or Group…” type in SYSTEM
- 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:\PoSH\Auto-Mount.ps1
- Click “OK”
- Conditions Tab
- Under Power uncheck “Start the task only if the computer is on AC power
- Click “OK”
- Have fun testing. I recommend opening the Camera app and taking some pictures, making sure it index the new ones, try adding music to the folder make sure it shows up in the music app, the same thing for the Video app.
Update 12-30-2012: Thank you, Don, for reminding me you need to set the execution policy on the machine first.
Love it? Share it!
Windows 8.1 now supports SD cards (I gather). Since the mounting and dismounting of the VHD seems a hit or miss process for me, Im wondering if I should get rid of the VHD. The question now is how. One way of course would be to reformat. But then Id have to copy all my files back on. Is there an alternative. I dont think simply dismounting the VHD does it because the files aren’t seen by the D: drive.
I got this to work flawlessly on my Surface RT but it refuses to work on my Surface Pro! I know I followed each step exactly as you’ve laid it out, so I don’t know what the issue could be.
Task Scheduler says that the operation completed successfully, but the VHD still isn’t mounted. When I try to run “Mount-DiskImage D:\Libraries.vhdx” in Powershell as Administrator to test it out, it tells me “Mount-DiskImage: Access is denied.” followed by some other text that I don’t really understand. I’m sure that this is the problem but I don’t know how to fix it. Anything that you can think of that might cause this to happen?
Now my screenshots are not showing, what i have to do?
By Screenshots do you mean the thumbnail of the pictures in your Photo Library?
Is it possible to remove/replace the SD card after creating the VHD? Will the same process work with external hard drive? Can external hard drive be removed? I have Surface RT.
You will want to disable the Start up Script if you remove the card and keep it removed prior to rebooting. Yes this will work the same with an external hard drive, same rule applies for the start up script except you will want to make sure it is also connected every time you start. If it isn’t you can skip the start up script and just double click the VHD every time.
Hi Matt!
Thanks for this fantastic guide, worked a treat for me. Hope MS get this sorted soon so we don’t need the work around.
Only problem I am having is downloading movies. It seems files are stored to a temporary location somewhere on the C: drive first before they are moved onto the SD card. This is a problem as I don’t want to keep 10gb free on C: all the time! Do you know of any way to override this so it is stored straight onto the SD card?
Thanks!
Thank you for the feedback. The default behavior with IE is when a download occurs it goes directly to the C drive, I do not know a work around for this but you will notice it’ll continue to download just slow down the progress an extreme amount.
Thanks for the article. Unfortunately everytime I try to make the vhd I get the error “The requested operation could not be completed due to a file system limitation”. I’ve tried multiple file sizes some well below the capcity of the card. Any ideas?
Are you using a Surface RT, Surface Pro, or partner hardware?
Surface Pro
Have you re-installed the OS or is it still running Windows 8 Professional?
Still running winows 8, haven’t re-installed the OS
How do you have the SD card formatted Fat32 or NTFS?
I just worked with my buddy @IT_Josh and he was able to verify on his Surface Pro that the problem is the card being formatted as FAT32, please format the SD card to NTFS and try again.
Worked, thanks!!!
New problem, the drive vhd mounts fine at restart but is nearly full. It ounly has 4 empty folders on it. Any Ideas?
So before you restart the VHD is full of files, once the computer comes back up after the restart the files are missing?
Oonly thing on the vhd/mounted disk are 3 empty file folders and one with a 1.5 mb file. they are all there on restart. The SD card itself on properties shows it is empty. The mounted drive shows nearly full on properties tab
I just tried a quick format of the mounted virtual drive. There is nothing on it and is shows 49 GB used and 8 free. The SD card shows empty
Actually it only shows 59 MB total space not GB. That because it is an expanding vhd? Either way I can’t store files more than 8 MBon it
Got it. Did a new vhd and it works fine. Guess I picked MB instead of GB when I set the drive size
Thanks!
Hi Mate,
First i have to thank you for this guide. But sill i’ve got a Problem over here.
I set up all as you wrote. It even works by adding photos to the “Pictures” Folder on the VHD. They were instantly displayed oin the Photo-App in Metro-UI.
I thought I’ve got it so I did a restart to test the Auto Attach Script. But after the restart, the VHD wasnt online. It didnt showed up under “Computer”. So i did a double click on the VHD.vhdx
Now it is online and can be selected. But if i copy new Pictures in the Folder, the Photo App wont Display the new ones….any Idea?
Did you immediately check after the computer started? Try giving it 5-10 seconds (remember it should be a Delay Start) and see if you are still experiencing the issue.
Yeah u were right. I was just impatient 🙂
But still got a Problem. The Photo App dont Show new Pictures again.
If I got the Indexing menu and unselect the VHD and select it again it starts seasrching. After it’s done all new Pictures Show up in the app…
Any Ideas why it didnt start automatically?
Thanks again 🙂
I was able to duplicate this, it also appears to be a patience issue 🙂
Hehe. But how Long i have to wait till it starts? ist been 10min now and nothing happend..:/
I am not sure how frequently the Indexing Service will look. I thought at first I was having same problem as you were but eventually the images did show up in the photo application.
Hi
Interesting article, I try to do following the instructions, but seems that I screw something, and revert everything
Now every time I take an screenshot is saved in the SD card (drive D:) also the camera store the photos in the SD but after I remove the SD card now pictures are stored in the disk C, but screenshots not appear in the screenshots library, I install back the SD card and continue to save on drive D, weird.
Any hint?
Also I wonder, if pictures are stored in the SD card and I delete by mistake one, the SD card doesn’t have a recycler bin, so I cannot un erase the picture, exist a procedure to set up a recycler bin in the SD?
Thanks for your help.
Edgar, the issue you are experiencing with your SD card is related to the configuration of your Libraries. You still have them set as the default, when the SD card is removed it is unable to find the primary so it stores it to the C drive. Please look at the current configuration of your Libraries and you should be able to resolve the issue.
Thank you so much for the guide! I used it on my Acer W510 and it really works well. I haven’t got the auto-script to work however. Trying to figure out what I’m doing wrong. Thanks!
Robert
Verify you have your PowerShell Execution Policy set for RemoteSigned, and you are pointing to the correct PowerShell file with the Scheduled Task.
awesome article. Everything seems to work but I cannot get my pictures to show in the photos app. I see them in my library in desktop under the VHD drive and I have configured the library to point to this folder under the VHD drive. Need help.
You need to make sure you enabled indexing. Until the drive is indexed the photos will not show up in the photo application.