A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » The Basics
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

FTYPE command in batch



 
 
Thread Tools Display Modes
  #1  
Old December 6th 03, 07:55 AM
Ian McAllen
external usenet poster
 
Posts: n/a
Default 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.
Ads
  #2  
Old December 6th 03, 07:59 AM
Ben McDonald [MSFT]
external usenet poster
 
Posts: n/a
Default FTYPE command in batch

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"
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.

Attached Files
File Type: (1.7 KB, 50 views)
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 02:34 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.