kavika13/RemCom — Issue #12: Support for 64 bits targets
Author: andrese
Created: 2012-01-23 16:24:29+00:00
State: open

When the target is a 64 bits system there are some problems when sending and executing a file. For instance with a command like this: remcom \\192.168.1.200 /user:midomain\miuser /pwd:mipwd /c miprogram.exe
The result is that the file is copied but it cannot be found when executed.

But as far as I have tested if you only execute a remote command (not transfer it it works fine).

The problem is that remcom first copies the exe to c:\windows\system32 and then executes it form the service that is a 32 bits program.

But 32 bits programs when tun in a 64 bits system by default CANNOT see c:\windows\system32. That is meant to be like that by windows design, see references:
http://support.microsoft.com/kb/942589
http://social.msdn.microsoft.com/Forums/sl-SI/netfx64bit/thread/cfdf4474-266b-4ef5-8992-7fbdc3147521

In short in 64 bits systems there are 2 system32 folders one for 64bits programs and another for 32 bits and remcom is storing the exe in the 64bits system32 and tries to execute it on the 32bits system32 folder.

So... I can think of 2 solutions:

1) keep remcom service as 32 bits and keep storing the exe file in regular (64bits) system32 folder and execute if forcing to use the 64bits folder. That is as easy as making the service to detect that it is running in a 64bits system and to execute the file under c:\windows\sysnative folder that is how 32bits software sees the 64bits system32 folder.

2) Compile remcom service as 64 bits too and distribute it in two flavours 32/64 bits. Then the client can chose what service to install for instance parsing a command line parameter...

This issue may be related (or not) with issue #10