Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a file type programmatically.
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00253168
Message ID:
00253175
Views:
21
>Does anyone know how to add a new registered file type programmatically? I want to add the following:
>
>Description of type: URL:MailTo Protocol
>Confirm Open After Download (checked)
>Enable Quick View (checked)
>
>ACTIONS
>Action: open
>Application used to perform action: "C:\Program Files\Microsoft Office\Office\outlook.exe" -c IPM.Note /m "%1"
>
>I imagine this would be a Win32API call. If someone has done this before and wouldn't mind sharing a code example, I would appreciate it.

Actually, it's just a few registry entries underh HKEY_CLASSES_ROOT; one to create the association between a file type and an app, and the other a set of keys that describe the app. Take a look at how HKEY_CLASSES_ROOT\.DOC points to the handler for .DOC files; follow the app references and you'll see how the necessary entries should be created.

>
>TIA,
>
>James
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform