conditional FTYPE?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have a situation which doesn't seem that strange, but I can't figure
out a way around it. I have one file type (ASSOC .php=PHPFile) which I
would like to run one way if it is invoked from the command prompt:
FTYPE PHPFile="c:\php.net\php.exe" "%1" %*

and slightly differently if it is invoked from Explorer:
FTYPE PHPFile="c:\php.net\php-win.exe" "%1" %*

The problem is that this FTYPE acts globally so I can't execute it on a
per command window invocation basis (in other words, make a change
local to that command window session). So the way out that I see is to
have that FTYPE be a conditional to cover both cases. Is that even
possible? It'd be great if someone could show me how.

Thanks,
Csaba Gabor from Vienna


By the way, is there a difference between "%L" and "%1" above? All of
my tests (invoking on file names with spaces, either in or out of
quotes) on my Win XP Pro system showed the same behaviour. Ex: "test
me.php", and I had test me.php show its argv.

.



Relevant Pages

  • Re: associating extensions with applications
    ... I am not sure what the "GUI" use to identify applications. ... the standard from a command window is to use the ... infrastructure that ties an actual application to a file type, ... Changing the file name extension from wpd to doc makes no difference - it still knows that this is a Word Perfect file. ...
    (Fedora)
  • Re: blind men and page declaration
    ... As far as I can see, it is not necessary at all to declare a file type ... I don't find it strange at all. ... How many times do you have to be told that FONT TAGS MUST BE CLOSED ...
    (alt.html)
  • Re: Utility to easily change file asociation
    ... David Candy wrote: ... |> You use assoc first to find the file type. ... | I said I did use ASSOC and I found it confusing and of no help. ... So when I run 'FTYPE JPG' it is not found. ...
    (microsoft.public.windowsxp.general)
  • Re: Utility to easily change file asociation
    ... David Candy wrote: ... |> You use assoc first to find the file type. ... | I said I did use ASSOC and I found it confusing and of no help. ... So when I run 'FTYPE JPG' it is not found. ...
    (microsoft.public.windowsxp.customize)
  • Re: File Extension
    ... assoc .rar=winrar ... to re-associate the file type. ... Dave Patrick ....Please no email replies - reply in newsgroup. ...
    (microsoft.public.windowsxp.general)