Page 1 of 1

TeraCopy failed

Posted: 23 Jul 2014 10:33
by grindax
.

Re: TeraCopy failed

Posted: 23 Jul 2014 10:49
by Stef123
Hm, can only show you my portable setup:

Code: Select all

TeraCopy (Rename All)|..\Copy_Teracopy\TeraCopy.exe|/RenameAll
TeraCopy (Overwrite Older)|..\Copy_Teracopy\TeraCopy.exe|/OverwriteOlder
TeraCopy (default)|..\Copy_Teracopy\TeraCopy.exe
EDIT: I just remembered something: A few weeks ago I had to hard-wire a path because XY resolved %programfiles% to "C:\Program Files (x86)"

Re: TeraCopy failed

Posted: 23 Jul 2014 11:19
by PeterH
Stef123 wrote:EDIT: I just remembered something: A few weeks ago I had to hard-wire a path because XY resolved %programfiles% to "C:\Program Files (x86)"
Just tried with
echo %ProgramFiles%;
in Address Bar. It showed what you predicted :ugeek:
Shows that XY is 32bit, on a 64bit system, I think :whistle:

Re: TeraCopy failed

Posted: 23 Jul 2014 11:29
by grindax
.

Re: TeraCopy failed

Posted: 23 Jul 2014 11:46
by Stef123
PeterH wrote:
Stef123 wrote:EDIT: I just remembered something: A few weeks ago I had to hard-wire a path because XY resolved %programfiles% to "C:\Program Files (x86)"
Shows that XY is 32bit, on a 64bit system, I think :whistle:
Thanks for filling me in - yeah, I kind of figured that - which is why I didn't post a "bug" about it. When you work portable on various systems, you learn to mistrust your own settings related to program files.

Nevertheless, is there a way I could "soft-wire" %programfiles% into a more flexible handling? Or let me ask you this: How would I refer to Program Files on a 64 system? Not (x86) this time, but the 64 native program files?

Re: TeraCopy failed

Posted: 23 Jul 2014 12:51
by grindax
.

Re: TeraCopy failed

Posted: 23 Jul 2014 13:43
by TheQwerty
grindax wrote:If I go to Help -> Environment Variables, this is what I see:

%ProgramFiles% = C:\Program Files (x86)
%ProgramFiles(x86)% = C:\Program Files (x86)
%ProgramW6432% = C:\Program Files

This is on a 64-bit system. In this case, it's not helpful that XY sees %ProgramFiles% differently to the operating system. Windows knows that %ProgramFiles% should resolve to 'C:\Program Files'. So the fact that XY uses the same name for that environment variable caused the confusion.
None of this is XY's doing but the way Microsoft has decided to do things.

You can verify this by doing the following:
1) Open the native command prompt: %windir%\System32\cmd.exe
2) Open the 32-bit command prompt: %windir%\SysWOW64\cmd.exe
3) In each execute: set prog

As you can see the running process' bitness determines how Windows configures its environment including the value of the %ProgramFiles% variable.