This happens from CompB

enter image description here

So, from CompB, wordpad can't open a file from the command line.

Whereas from CompA, it opens

enter image description here

Both are running Windows 7

How can I make CompB, where wordpad doesn't open the file from the command line, like CompA that does?

Both of them if I do where wordpad then both of them show c:\windows\system32\wordpad.exe

so it's not running a bat file..


Now I managed it for both. On the one where C:\blah>wordpad a.a wasn't opening it, using the program files wordpad worked.

So of the two computers,

One where both wordpad locations work(CompA). One where only one wordpad locationworks(CompB, c:\program files..wordpad.exe).

The CompA c:\windows\system32\wordpad.exe is 214KB, and c:\program files...\wordpad.exe is 4MB.

The CompB, both locations wordpad.exe is 4MB

Looking at CompA if I copy c:\windows\system32\wordpad.exe to c:\program files...\wordpads.exe (wordpads.exe, the s for system32), then "c:\program files\...\wordpads.exe" a.a works. So for CompA, it doesn't matter which wordpad file size is run, or what its filename is, or where it is run from. I can make a directory c:\ggg copy wordpad to it, and make an a.a file, and run .\wordpad.exe a.a and it works. Or I can copy the wordpad from "program files", to c:\ggg and run .\wordpad.exe a.a and that works. Both wordpad.exe files are different sizes but they each run from anywhere and with a parameter passed to them, and can be renamed too and still work.

CompB has the two wordpad files both 4MB and is fussy. It only runs wordpad.exe from program files. And even copying the program files wordpad, to wordpad.exe it won't run it. So the location has to be program files, and the filename has to be wordpad.exe

I wonder if maybe some time I ran "default programs editor" on CompA, but I just tried it on CompB and don't see anything there that would make a difference. I found a bat file on CompA funnily enough, called wordpad.bat that runs the program files wordpad.exe with start "" "c:\Program Files\Windows NT\Accessories\wordpad.exe" %1 which I recall as being a solution to the problem at one time. So I must have had the issue at one time on CompA. But now CompA is fine. And it works without that bat file. (that bat file is not in my path). I wonder if maybe there's something in the registry of CompA that isn't for CompB. Though I don't know what. I tried looking at output from assoc and ftype commands though no difference there that I can see. CompA has been around for years, since I first tried Win7 and I notice that c:\windows\system32\wordpad.exe that's 200KB, is dated 2004 so may be I copied it from XP for whatever reason. But CompA has no issue with either wordpad.

I notice also that both comps have 2 in program files directories, one in c:\program files x86, that is 4.2MB and one in c:\program files that is 4.5MB

This from CompB

enter image description here

So wordpad from x86 worked.

But the second call to wordpad didn't work.

It's sensitive to the filename.

It's clearly not an issue with path variable but just to further show that it isn't. If you do .\wordpad a.a that works, and then copy wordpad.exe wordpad_px86.exe and .\wordpad_px86 a.a then same error.

C:\Program Files (x86)\Windows NT\Accessories>dir wordpad*.exe
28/08/2018  06:46         4,247,040 wordpad.exe
28/08/2018  06:46         4,247,040 wordpad_px86.exe
C:\Program Files (x86)\Windows NT\Accessories>

It's filename sensitive.

But on CompA, it doesn't matter what I copy the binary as, it works opening the file passed as a parameter.


A solution that has worked, though I don't quite understand why [yet], is

I see there are two wordpad.exe files.

One in \windows\system32 and one in \program files. Running the one in program files, works.

There are a bunch of oddities, and i've added that to the question.

| improve this answer | |
  • I wonder if what you see is unique to that particular system. My Windows 7 system here only has Wordpad in Program Files (X86) and not in System32. The same is true in my Host Windows 10 system. Try rename the file in System 32 as wordpad.xxx , restart and see if the issue is still there. – John May 17 at 2:28
  • @John I don't mind having 2. I guess the 4MB one which is in program files, is the normal one. But what i'm wondering about is this error message i.stack.imgur.com/FuGjR.png (unable to create new document). Supposing a.a exists, If you do wordpad a.txt does it say A)"unable to create new document" , or does it B)open the file ? – barlop May 17 at 3:15
  • I am not sure about the message that comes up when trying to use Wordpad from System32 except that Windows does not expect to find Wordpad there - only in Program Files (X86). – John May 17 at 10:44
  • @John so forget the system32 thing. I just edited my question, it looks like it's filename sensitive on CompB e.g. wordpad.exe vs wordpad_p86.exe. It's the same wordpad binary. – barlop May 17 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.