tags:

views:

199

answers:

1

We have an installation program that runs in Perl 32-bit. This program needs to get information on cluster resources, so it runs cluster.exe (using backticks) and parse its output.

On Windows Server 2003 this went well, as a 32-bit version of cluster.exe existed under syswow64. However, such a 32-bit version does not exist on Windows Server 2008, so the backticks run of cluster.exe says it can't find such an executable, as 32-bit process look for it under syswow64.

Can someone think of a way we can bypass this problem and get the cluster resource information? One manual way is to copy the 64-bit version of cmd.exe from system32, and then run it with "/c cluster.exe" which will start the 64-bit cluster.exe under system32. (Copying the cluster.exe won't work well, as it can't find the cluster cache.) However, this is only good as a manual workaround, and not as a solution to all users.

Is there another way to cause windows to start the 64-bit cluster.exe?

Thanks,
splintor

PS
A similar question was asked on technet a month ago, but didn't get a real answer.

A: 

I found two possible solutions: One is to write a small 64-bit application named cluster.exe that simply calls %SystemRoot%\System32\cluster.exe (using system()), and put it under %SystemRoot%\syswow64. Since it is a 64-bit application, the correct 64-bit cluster.exe application will be called.

Another solution is to use the sysnative redirection (as explained here), so now we check - if %SystemRoot%\**System32*\cluster.exe exists, we use it, else if %SystemRoot%\*Sysnative**\cluster.exe exists we use it, else we use plain cluster.exe.

Note: this is very similar to this telnet.exe problem that just got answered.

splintor

related questions