User Tools

Site Tools


wiki:os:microsoft:windows:10:hacks:digicam

Digital Cameras

Photo Import Wizard

The Problem

Since Windows XP, a simple wizard for importing photos has been integrated with the OS. This was called the *Microsoft Scanner and Camera Wizard* in Windows XP. The interface was streamlined in Windows Vista, and that import wizard has been integrated into Windows through at least Windows 10. It's a really useful tool, as it makes it efficient and easy to import photos from a digital camera and name them

Windows 7 added the ability to sort them into named folders. The wizard displays your photos grouped by timestamp, making it easy to categorize different events and photo shoots.

In Windows 10, however, it's not easy to get to the old Vista-style photo import wizard. The autorun dialog no longer displays the wizard as an option. Fortunately, this is easy to fix.

The Fix

The legacy photo import wizard is actually contained within a system DLL. To display the wizard, you have to access a function in the DLL, and pass it the unique hardware ID of your camera.

Finding your camera's hardware ID is actually very easy - the only prerequisite is that your camera has already been connected to your system at least once, which saves its hardware ID in the system registry:

Launch PowerShell (Ctrl+X > Windows Powershell), and enter the following, substituting Canon for a unique word in the display name of your camera (what appears in File Explorer when your camera is connected; it's usually the brand and model):

Get-PnpDevice | ? {$_.friendlyname -like "*Canon*"} | ft -a

This will return something like this:

Status  Class FriendlyName             InstanceId
------  ----- ------------             ----------
Unknown WPD   Canon PowerShot SX720 HS USB\VID_04A9&PID_32C2\96423D7C29464A47B4558F67B8F7227E
Unknown WPD   Canon PowerShot SX720 HS SWD\DAFUPNPPROVIDER\UUID:7C3D4296-474A-4629-FFFF-55B47E22F7B8

My Canon SX720 supports both USB and wifi connectivity, so there are two hardware entries - the InstanceId beginning with USB is obviously the USB entry; the other is the wireless one.

Copy the InstanceId value into your favorite text editor, and replace all slashes \ with hashes #, so your value looks like this:

USB#VID_04A9&PID_32C2#96423D7C29464A47B4558F67B8F7227E

Now, insert this value into the following command, replacing YOURVALUEHERE with the above ID. This will be your application shortcut to the photo import wizard.

C:\WINDOWS\System32\rundll32.exe "C:\Program Files\Windows Photo Viewer\PhotoAcq.dll",PhotoAndVideoAcquire "\\?\YOURVALUEHERE#{6ac27878-a6fa-4155-ba85-f98f491d4f33}"

The GUID in {curly braces} references the DLL component used. You can read more about it here.

Finally, create a shortcut from the command. An easy way to do this is by right clicking in either a folder or on your desktop, and selecting New > Shortcut. Once your shortcut is created, you can choose a new icon from %SystemRoot%\System32\SHELL32.dll, which contains several digital camera icons.