FTYPE command in batch

I

Ian McAllen

Hello,
i have a problem with file associations in a batch. When i
execute 'ftype artdoc=%systemroot%\artdoc.exe "%1"' on the
command line it works fine but if i execute the same
command in a logon script the "%1" option (open?) is not
there when i list the assciations using "ftype". It just
answers 'artdoc=c:\windows\artdoc.exe ""' and the document
associated to this type does not open immediately when
doubleclicking it.
 
B

Ben McDonald [MSFT]

Ian,

So an example of how this is normally done:

c:\>assoc .foo=FooType
..foo=FooType

c:\>ftype FooType=notepad %1
FooType=notepad %1

c:\>copy con foo.foo
ff
^Z
1 file(s) copied.

c:\>foo
'foo' is not recognized as an internal or external command,
operable program or batch file.

c:\>foo.foo
<sucessful launching of notepad with my file>

c:\>set PATHEXT=.foo;%PATHEXT%
c:\>foo
<sucessful launching of notepad with my file>


You have done the above steps and it works well from the command line and
explorer? But when you use it in a login script it fails to run properly?

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

--------------------
From: "Ian McAllen" <[email protected]>
Subject: FTYPE command in batch
Hello,
i have a problem with file associations in a batch. When i
execute 'ftype artdoc=%systemroot%\artdoc.exe "%1"' on the
command line it works fine but if i execute the same
command in a logon script the "%1" option (open?) is not
there when i list the assciations using "ftype". It just
answers 'artdoc=c:\windows\artdoc.exe ""' and the document
associated to this type does not open immediately when
doubleclicking it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top