Topic: Associate file types does not work (1 of 10), Read 30 times
Conf: Startup, File Open, Exit
From: Pauli Lindgren
Date: Thursday, May 24, 2007 09:56 AM

Some time ago I wanted to associate some more filetypes to Vedit.

I ran "Associate file types" from the Config menu and associated .c and .h files to Vedit.

First, nothing happened. The files still had CodeWrigth icon in front of the filename.

Then I re-booted my computer. Now the icons in front of the file name changed to Vedit icon. But double-clicking the filename still opens CodeWright.

So, it seems that Vedit's Associate file types function is not able to remove the old association. I guess it would be possible to remove the old association using the tools of Windows, but it would be better if Vedit could do it.

--
Pauli

 


Topic: Associate file types does not work (2 of 10), Read 23 times
Conf: Startup, File Open, Exit
From: Ian Binnie
Date: Thursday, May 24, 2007 08:38 PM

On 5/24/2007 9:56:37 AM, Pauli Lindgren wrote:
>Some time ago I wanted to
>associate some more filetypes
>to Vedit.
>
>I ran "Associate file types"
>from the Config menu and
>associated .c and .h files to
>Vedit.
>
>First, nothing happened. The
>files still had CodeWrigth
>icon in front of the filename.

Icon is only refreshed on re-boot, but association should apply.

>Then I re-booted my computer.
>Now the icons in front of the
>file name changed to Vedit
>icon. But double-clicking the
>filename still opens
>CodeWright.
>
>So, it seems that Vedit's
>Associate file types function
>is not able to remove the old
>association. I guess it would
>be possible to remove the old
>association using the tools of
>Windows, but it would be
>better if Vedit could do it.
>
>--

Pauli,

This works here, but removal is not appropriate.

You do not mention OS, but XP (and probably 2K) allows multiple associations.

If you right click, you will see "Open", and also "Open With", which gives a choice of programs.

Try selecting Vedit, then see what happens on subsequent opens.

 


Topic: Re: Associate file types does not work (3 of 10), Read 25 times
Conf: Startup, File Open, Exit
From: Ted Green
Date: Friday, May 25, 2007 10:52 AM

At 08:39 PM 5/24/2007, you wrote:

>This works here, but removal is not appropriate.

When a file is associated with VEDIT, I do attempt to remove any other association. Evidently I am not doing it correctly in all situations.

The supplied macro registry.vdm fully implements this function. Look at the code starting at line 341. The guts are at code starting at line 497. Notice the code at line 582. Perhaps we are missing something here.

A little notice feature is that we create the file reassoc.vdm, which can be run to re-build all associations. This is useful when transferring VEDIT to another computer.

Ted.

 


Topic: Re: Associate file types does not work (4 of 10), Read 27 times
Conf: Startup, File Open, Exit
From: Ian Binnie
Date: Friday, May 25, 2007 10:08 PM

On 5/25/2007 10:52:07 AM, Ted Green wrote:
>When a file is associated with
>VEDIT, I do attempt to remove
>any other association.
>Evidently I am not doing it
>correctly in all situations.

Ted, I have no problem with the current.
XP has a list of "Recommended Programs" (not sure where this resides in registry)

There is also an option "Always use this program to open these files", which may be worth investigating.

You can check associations at cmd prompt by:-
assoc .txt
(.txt=txtfile)

then
ftype txtfile
(txtfile=d:\vedit\vpw.exe "%1")

>The supplied macro
>registry.vdm fully implements
>this function. Look at the
>code starting at line 341. The
>guts are at code starting at
>line 497. Notice the code at
>line 582. Perhaps we are
>missing something here.
>
>A little notice feature is
>that we create the file
>reassoc.vdm, which can be run
>to re-build all associations.
>This is useful when
>transferring VEDIT to another
>computer.

This is very handy (including reloads etc).
I made a copy years ago, and renamed it.

Unfortunately Vedit overwrites reassoc.vdm every time it is installed or the association macro run.

 


Topic: Re: Associate file types does not work (6 of 10), Read 25 times
Conf: Startup, File Open, Exit
From: Pauli Lindgren
Date: Monday, May 28, 2007 10:29 AM

On 5/25/2007 10:08:39 PM, Ian Binnie wrote:
>
>Ted, I have no problem with the current.
>XP has a list of "Recommended Programs"
>(not sure where this resides in
>registry)
>
>There is also an option "Always use this
>program to open these files", which may
>be worth investigating.

On my computer, the "Always use this program.." option is gray, so it can not be unchecked. (Maybe this is because of some security settings.)

Anyway, I changed the "Open with" setting from the properties, and now double-click does open the file in Vedit.

Strange thing is that on the "General" tab, it said "Open with CodeWright". But when I clicked "Change" to display the list of programs, Vedit was already highlighted.

>
>You can check associations at cmd prompt by:-
>assoc .txt
>(.txt=txtfile)
>
>then
>ftype txtfile
>(txtfile=d:\vedit\vpw.exe "%1")

I tried that. Before I had changed the association from Properties, the command assoc .c displayed
cfile
and then "ftype cfile" command displayed
cfile="c:\apps\vedit\vpw.exe" "%1"

Still, when I entered a filenamme, e.g. main.c,
the file opened in CodeWrigth.

After I had changed the properties, the command prompt opens the files in Vedit.

Looks like Windows XP does not actually use the keys that are displayed with cfile etc. but instead those displayed in the properties.

I compared the keys before and after changing the "Opens with" property. The only difference I found was that when any other application was associated to an extension, there is the following key (for .c files):
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.c\Application
and it contains the name of the exe file (without path), e.g. "cw32.exe".
When Vedit is set as "Open with" program, the key above disappears.

(The same key is in HKEY_USERS hierarchy, too.)

So, I guess you need to either delete the key or set it's value to "vpw.exe". The following command seems to work:
Registry_Set_Item("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.c\Application=vpw.exe")
But I don't know if that should be set in HKEY_USERS, too.

--
Pauli

 


Topic: Associate file types does not work (5 of 10), Read 22 times
Conf: Startup, File Open, Exit
From: Pauli Lindgren
Date: Monday, May 28, 2007 09:48 AM

On 5/24/2007 8:38:26 PM, Ian Binnie wrote:
>
>You do not mention OS, but XP (and
>probably 2K) allows multiple
>associations.

I have Windows XP Pro SP2.

>
>If you right click, you will see "Open",
>and also "Open With", which gives a
>choice of programs.
>
>Try selecting Vedit, then see what
>happens on subsequent opens.

"Open With" has several choices, depending on the file type.
Vedit can be selected with many file types that I have not even associated to Vedit, such as .jpg and .gif files etc. In some cases, there is no "Open with" menu, but instead "Open with Vedit" is a direct option in the right click menu (I guess this means that Vedit is the only associated application for that file type.)

So it seems that XP adds an application automatically to the list whenever you use that application to open a file.

Anyway, selecting Vedit from right click menu does not have any effect on subsequent opens. The .c and .h files still open in CodeWright.

--
Pauli

 


Topic: Associate file types does not work (7 of 10), Read 23 times
Conf: Startup, File Open, Exit
From: Ian Binnie
Date: Tuesday, May 29, 2007 07:41 PM

On 5/28/2007 9:48:44 AM, Pauli Lindgren wrote:
>In some cases, there is no "Open with"
>menu, but instead "Open with Vedit" is a
>direct option in the right click menu (I
>guess this means that Vedit is the only
>associated application for that file
>type.)
>
>So it seems that XP adds an application
>automatically to the list whenever you
>use that application to open a file.
>
The "Open with VEDIT" is a shell extension (see registry.vdm)

This does not rely on file associations (as far as I am aware).
I am not sure what logic determines if this is displayed, you may be right. I have opened just about every file type in Vedit, so it appears on all file types, although other shell extensions do not.

 


Topic: Re: Associate file types does not work (8 of 10), Read 26 times
Conf: Startup, File Open, Exit
From: Ted Green
Date: Thursday, May 31, 2007 10:37 AM


>The "Open with VEDIT" is a shell extension (see registry.vdm)
>
>This does not rely on file associations (as far as I am aware).
>I am not sure what logic determines if this is displayed, you may be right. I have opened just about every file type in Vedit, so it appears on all file types, although other shell extensions do not.

Yes, "Open with VEDIT" is a shell extension implemented with vshellx.dll and 'registered' with Windows so that it runs when Windows starts up. It sets its own properties, which are to allow opening any file.
It has nothing to do with file associations; you cannot see its properties in the registry, and it has nothing to do with registry.vdm.
As far as I can tell, it works well with Win98 through WinXP.

Ted.

 


Topic: Re: Associate file types does not work (9 of 10), Read 28 times
Conf: Startup, File Open, Exit
From: Pauli Lindgren
Date: Friday, June 01, 2007 11:40 AM

On 5/31/2007 10:37:15 AM, Ted Green wrote:
>
>
>Yes, "Open with VEDIT" is a shell extension implemented
>with vshellx.dll and 'registered' with Windows so
>that it runs when Windows starts up. It sets its own
>properties, which are to allow opening any file.
>It has nothing to do with file associations; you cannot see
>its properties in the registry, and it has nothing
>to do with registry.vdm.
>As far as I can tell, it works well with Win98 through WinXP.

Then what specifies which files are listed in the "Recommended programs" list that is displayed when you right-click a file and then select "Properties" and click "Change"?

For some files, Vedit is the only choice, while for some other files, there are many different programs to choose from. For some files (e.g. .obj), there are no recommended programs, and the "Open with" section in properties dialog displays "unknown application".
The "Other programs" section contains more programs, but not all programs that can be used to open files.

--
Pauli

 


Topic: Re: Associate file types does not work (10 of 10), Read 20 times
Conf: Startup, File Open, Exit
From: Ted Green
Date: Tuesday, June 05, 2007 12:53 PM

At 11:57 AM 6/1/2007, you wrote:
>From: "Pauli Lindgren"
>Then what specifies which files are listed in the "Recommended programs" list that is displayed when you right-click a file and then select "Properties" and click "Change"?
>
>For some files, Vedit is the only choice, while for some other files, there are many different programs to choose from. For some files (e.g. .obj), there are no recommended programs, and the "Open with" section in properties dialog displays "unknown application".
>The "Other programs" section contains more programs, but not all programs that can be used to open files.

I do not know this answer; it is obviously related to how other programs are registered in the Registry. A program can be registered directly, through a .DLL and/or through its CLSID. A big mystery to most...

Ted.