File associations in the command line seems broken

  • Thread starter Thread starter Joan
  • Start date Start date
J

Joan

Guest
Hello,

I'm forced to specify the program with which I want to open a file, I cannot
launch files from the command line directly (and rely on the file extension
association)...

I can launch .exe and .bat fine. If I try to open a text file, it fails :
>test.txt

"The system cannot execute the specified program"

The association is ok in explorer: If I double click on a text file, it will
open it with notepad.
I can also do:
>notepad test.txt

and this will work, so notepad is found in the path. (it's in \system32
anyway)

Here is the result of associations commands :
>assoc .txt

..txt=txtfile

>ftype txtfile

txtfile=%SystemRoot%\system32\NOTEPAD.EXE %1

So everything looks fine from what I can tell, only I can't launch the file
directly.

It is a major annoyance because we have a bunch of python scripts that rely
on this file association to launch each other from the command line and they
all fail on my machine due to this problem.

Thanks for any idea, insight, pointers...
 
Re: File associations in the command line seems broken

Try this:

http://www.dougknox.com/xp/fileassoc/xp_txt_fix.zip


ju.c


"Joan" <Joan@discussions.microsoft.com> wrote in message
news:3601363F-E1C0-41AF-BA11-554EEDA49A0D@microsoft.com...
> Hello,
>
> I'm forced to specify the program with which I want to open a file, I
> cannot
> launch files from the command line directly (and rely on the file
> extension
> association)...
>
> I can launch .exe and .bat fine. If I try to open a text file, it
> fails :
>>test.txt

> "The system cannot execute the specified program"
>
> The association is ok in explorer: If I double click on a text file,
> it will
> open it with notepad.
> I can also do:
>>notepad test.txt

> and this will work, so notepad is found in the path. (it's in
> \system32
> anyway)
>
> Here is the result of associations commands :
>>assoc .txt

> .txt=txtfile
>
>>ftype txtfile

> txtfile=%SystemRoot%\system32\NOTEPAD.EXE %1
>
> So everything looks fine from what I can tell, only I can't launch the
> file
> directly.
>
> It is a major annoyance because we have a bunch of python scripts that
> rely
> on this file association to launch each other from the command line
> and they
> all fail on my machine due to this problem.
>
> Thanks for any idea, insight, pointers...
>
 
Re: File associations in the command line seems broken

Try "Start filename.txt"

If that does not, help:

1. Download FileExtInfo.zip from here:
http://windowsxp.mvps.org/fileextinfo.htm

2. Unzip the utility and extract the files to Desktop.
3. Double-click "FileExtInfo.exe" to run it.
4. Select [.TXT] from the list box
5. Click "View file association report"
6. Copy the contents of the report and include it in your reply.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
Windows® Troubleshooting http://www.winhelponline.com
Winhelponline.com blog http://www.winhelponline.com/blog


"Joan" <Joan@discussions.microsoft.com> wrote in message news:3601363F-E1C0-41AF-BA11-554EEDA49A0D@microsoft.com...
Hello,

I'm forced to specify the program with which I want to open a file, I cannot
launch files from the command line directly (and rely on the file extension
association)...

I can launch .exe and .bat fine. If I try to open a text file, it fails :
>test.txt

"The system cannot execute the specified program"

The association is ok in explorer: If I double click on a text file, it will
open it with notepad.
I can also do:
>notepad test.txt

and this will work, so notepad is found in the path. (it's in \system32
anyway)

Here is the result of associations commands :
>assoc .txt

..txt=txtfile

>ftype txtfile

txtfile=%SystemRoot%\system32\NOTEPAD.EXE %1

So everything looks fine from what I can tell, only I can't launch the file
directly.

It is a major annoyance because we have a bunch of python scripts that rely
on this file association to launch each other from the command line and they
all fail on my machine due to this problem.

Thanks for any idea, insight, pointers...
 
Re: File associations in the command line seems broken

Hi,

Thanks for your concern,

We just found out the origin of the problem minutes ago... It was a third
party antivirus program that was messing with command.exe...

program: Moon Secure AV.
fix: stop the NT service (closing the GUI front end is not enough)
Apparently they are planning a bugfix for this.
 
Back
Top