Does anyone out there in PC land know how to bring up the Windows XP
"Microsoft Scanner and Camera Wizard" simply by running an executable?
I can never get it to work with a sandisk flashcard but you can
try the Windows Image Acquisition and Control Manager (wiaacmgr):
C:\os\winxp\system32\wiaacmgr.exe -SelectDevice -ShellExecuteEx -Image
If you don't know where your OS is actually located, just use this:
Start > Run > wiaacmgr.exe
If all you have is your compactflash card in the flashcard PCMCIA adapter,
up may pop an error with the title (using Windows XP SP1):
Scanner and Camera Wizard
Containing the (not very helpful) text:
The computer cannot detect the scanner or camera.
Please make sure the device is turned on
and is properly connected to the computer.
If the computer still cannot detect the device,
open Control Panel, click Scanners and Cameras,
and then click Add Device.
Duh! There is no scanner nor is there a camera!
There's just a ton of pictures on the compactflash card which is
Drive F: on My Computer. If anyone can get the wiaacmgr to pop up
without a scanner or camera attached, they are a god or goddess!
Make sure to check your registry (from
http://msdn.microsoft.com)
to make sure this lousy KGB key/value pair is NOT there:
MSDN Home > MSDN Library > User Interface Design and Development >
Windows Shell > Shell Programmer's Guide > Shell Basics >
Shell Basics: Extending the Shell > Using Hardware AutoPlay >
Preparing Hardware and Software for Use with AutoPlay >
Preventing AutoPlay for a Component:
To prevent AutoPlay from launching in response to an event,
add the following REG_SZ value, as shown in this example.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
Explorer\AutoplayHandlers\CancelAutoplay\CLSID\
00000000-0000-0000-0000-000000000000
AutoPlay searches for media four directory levels below the root
directory to find known file types. It uses the PerceivedType value
associated with a file extension in the registry to determine the
file category, whether it is an image, an audio file, or a video file.
With this information, AutoPlay launches the appropriate handler
for that device and file type. For more information, see
http://msdn.microsoft.com
MSDN Home > MSDN Library > User Interface Design and Development >
Windows Shell > Shell Programmer's Guide > Shell Basics >
Shell Basics: Extending the Shell > Creating a File Association >
File Associations: PerceivedTypes and SystemFileAssociations >
PerceivedTypes, SystemFileAssociations, and Application Registration
Whenever the Shell needs to query for file association attributes
for a file type, it creates an array of registry keys.
The Shell checks the following registry keys, in order of
decreasing priority.
1. User Customized Key.
This key is used only if the user has customized a file
extension's association to override the default.
Typically this is either an application key or another
programmatic identifier (PROGID).
2. ProgID Key.
This key is specified as the default value of the extension key.
3. SystemFileAssociations Key. See below.
4. SystemFileAssociations PerceivedType Key. See below.
5. Base Class Key. For files, this is the ASTERISK(*) key.
6. AllFileSystemObjects Key. All files and file folders.
PerceivedTypes
PerceivedTypes are similar to file types except they refer to broad
categories of file format types, rather than specific file types.
For example, Image, Text, Audio, and Compressed are PerceivedTypes.
File types (generally public file types) can also have a PerceivedType,
and should always be defined as such when appropriate.
For example, the image file types .bmp, .png, .jpg and .gif
are also of PerceivedType Image.
The system defines several PerceivedTypes in Microsoft® Windows® XP.
These include the following:
* Image
* Text
* Audio
* Video
* Compressed
* System
The SystemFileAssociations key under HKEY_CLASSES_ROOT stores
PerceivedTypes.
For example, the PerceivedType text appears as follows:
HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\edit\command
(Default) = "%SystemRoot%\system32\NOTEPAD.EXE" "%1"
open
command
(Default) = "%SystemRoot%\system32\NOTEPAD.EXE" "%1"
A file type's perceived type is indicated by including a
PerceivedType registry string in the file type's key and
specifying the perceived type. For example, to include .cpp
files as PerceivedType text, you enter the following:
HKEY_CLASSES_ROOT
..cpp
PerceivedType= text
SystemFileAssociations
The SystemFileAssociations keys exist to guarantee that Shell
extensions are installed regardless of the current default
PROGID or user customization. These keys enable Windows XP to
define fallback attributes for file types and enable shared file
associations. Supplemental verbs should be added under
SystemFileAssociations
Application Registration
When the ShellExecute function is provided with the name of
an executable file in its lpFile parameter, there are several
places that it can look in an attempt to find the file,
including the following:
* The current working directory
* The Windows directory (no subdirectories are searched)
* The Windows\System32 directory
* Directories listed in the PATH environment variable
* The App Paths registry key
The order that those locations are searched varies, though the
App Paths key is preferred in Windows XP Service Pack 1 (SP1).
The keys found under App Paths are used primarily for the
following two purposes.
* To map the name of an application's executable file
to the file's fully qualified path.
* To append information to the PATH environment variable on
a per-application, per-process basis.
To provide this functionality for your application, add a subkey
with the same name as your executable file to the App Paths key
as follows:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
file.exe
(Default) = The fully-qualified path and file name
Path= A semicolon-separated list of directories
DropTarget= {CLSID}
Note The file name can be provided without its .exe extension.
The ShellExecute function adds the extension if necessary when
searching App Paths .
If a key matching the file name is found, the Shell can perform
two actions. First, the (Default) value can be used as the file's
fully-qualified path. Second, the Path value for that key can be
appended to the end of that process' PATH environment variable.
If that functionality is not required, the Path value can be omitted.
DropTarget is a REG_SZ value containing the class identifier (CLSID)
of an object—usually a local rather than in-process server—that
implements IDropTarget. By default, when the target is an
executable file, the Shell converts the list of dropped files
into a command line parameter passed to ShellExecute in its
lpParameters parameter. There are several potential issues
that can arise from this.
* The Shell limits the length of a command line to
MAX_PATH * 2 characters. If there are a lot of files or
their particular paths are long, file names later in the
list can be lost.
* Some applications do not accept multiple file names
in a command line.
* Applications that accept multiple file names do not have
a standardized file name format that they accept.
The Shell provides the parameter list as a quoted string,
but some applications might require strings without quotes.
* Not all items that can be dragged are part of the file
system—printers, for example. These items do not have a
standard Win32 path, so there is no way to provide a
meaningful lpParameters value to ShellExecute.
Using the DropTarget value avoids these issues by giving
access to all of the clipboard formats, including
CFSTR_SHELLIDLIST (for long file lists) and CFSTR_FILECONTENTS
(for non-file system objects).
In addition to the three values recognized by the Shell,
an application can also add custom values to its key to
use as needed.
Applications are encouraged to use the App Paths key to
provide an application-specific path rather than adding
to the global system path.
Related Topics:
* InvokeVerb
* Verbs
* ShellExecute
* ShellExecuteEx