cmd64.exe is 32-bit

Antworten
Benutzeravatar
SisterOfMercy
Beiträge: 1523
Registriert: 22 Jun 2012, 19:18

cmd64.exe is 32-bit

Beitrag von SisterOfMercy »

I needed to call the 64-bit version of rundll32.exe for a deinstall script, but couldn't get it to work.
It took me a while to find out that the cmd64.exe file is the same as the one in c:\windows\systemWOW64\
Apparently if you copy c:\windows\system32\cmd.exe tot c:\windows\cmd64.exe from a 32-bit program the cmd.exe copied is actually the one from c:\windows\systemWOW64\

I copied the c:\windows\system32\cmd.exe with a 64-bit windows explorer to c:\windows\cmd64.exe
This worked. The 64-bit cmd.exe is around 580 kB, and the 32-bit version around 370 kB.

Another solution is to make a link to the 64-bit cmd.exe
As we are using Windows XP x64, which comes without mklink I used fsutil.
fsutil hardlink create c:\windows\cmdx64.exe c:\windows\system32\cmd.exe
I think this needs to be run from a 64-bit cmd.exe, otherwise you will hardlink to c:\windows\systemWOW64\cmd.exe
This also works.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Benutzeravatar
d.oertel
uib-Team
Beiträge: 3319
Registriert: 04 Jun 2008, 14:27

Re: cmd64.exe is 32-bit

Beitrag von d.oertel »

Hi,

thank you for your report.
Your problem is not common. So please let me know how you installed the opsi-client-agent on the maschine (service_setup.cmd / opsi-deploy-client-agent / while OS-Installation / any other).
I think that you analized the problem correctly. This means that you started the opsi-client-agent installation from a 32 bit envirionment (and I want to know how you had done this).
But how ever - this is a bug - and since opsi-winst know the parameter /64bit for DosBatch sections the opsi-winst is able to copy the correct cmd.exe.
So I will change this in the next opsi-winst /opsi-client-agent version.

regards

d.oertel
opsi support - uib gmbh

For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
Benutzeravatar
SisterOfMercy
Beiträge: 1523
Registriert: 22 Jun 2012, 19:18

Re: cmd64.exe is 32-bit

Beitrag von SisterOfMercy »

d.oertel hat geschrieben:Your problem is not common. So please let me know how you installed the opsi-client-agent on the maschine (service_setup.cmd / opsi-deploy-client-agent / while OS-Installation / any other). I think that you analized the problem correctly. This means that you started the opsi-client-agent installation from a 32 bit envirionment (and I want to know how you had done this).
Oh bugger, I think I started the installation of the client from Total Commander, which is only 32-bit. (64-bit is coming with v8). That might make a difference.
I executed \\opsidemo\opsi_depot\opsi-client-agent\service_setup.cmd to install..
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Benutzeravatar
SisterOfMercy
Beiträge: 1523
Registriert: 22 Jun 2012, 19:18

Re: cmd64.exe is 32-bit

Beitrag von SisterOfMercy »

Mea culpa, mea maxima culpa. When installing opsi-client-agent 'normally' it copies the correct cmd.exe to the c:\windows directory. Normally this isn't a problem, I never had issues with installing programs from Total Commander. Well, time to upgrade to v8.

I do want to point out that %sysnative% is not available in Windows XP x64, this was introduced with Vista. So please don't depend on that and break compatibility :D

Anyway, thanks for your reply, I hope I can soon use OPSI in production, that will save me a lot of time.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Antworten