I appreciate your suggestions.. Thanks for taking the time to reply.. Obviously this problem is a real rear end kicker as there have not been many replies.. Perhaps most are lucky not to have to work in winders environments..
But I was looking for answers as to why this doesn't work in Windows 2008 but works in previous versions of Windows.. A couple of things first since you asked.. The double quotes are required since the scalar $Name can contain spaces and the double quotes make sure the value is passed as one command line argument.. The back ticks are a simple way to capture the output of the command to a scalar as in $output = `cluster group "$Name"`; (less typing).. Now to the problem.. My first thoughts were to provide the full path to the cluster command (i.e. c:\\windows\\system32\\cluster.exe) but this also returned the same results.. I did some research and found the problem to be related to the way the 64bit "stuff" works in winders.. I found the following web link which defines the problem and the fix.. http://www.tipandtrick.net/2008/how-to-suppress-and-bypass-system32-file-sys tem-redirect-to-syswow64-folder-with-sysnative/ So my thoughts about providing the full path were correct, I just had to use the fake path as shown below.. `%windir%\\Sysnative\\cluster.exe group "$Name"`; So now I get to add a block to lots of code to be moved to Windows 2008 to check for windows version info and set the path accordingly.. lots of fun.. Anyway thanks again for the reply and I sure hope what I found helps someone in the future.. Flk k From: timothy adigun [mailto:2teezp...@gmail.com] Sent: Friday, February 03, 2012 2:35 PM To: Frank Kleinburg Subject: Re: local commands in Win2008R2 Hi Frank, Try system("cluster group $Name"); why use backtick? On Thu, Feb 2, 2012 at 6:02 PM, Frank Kleinburg <fklei...@gmail.com> wrote: Folks, Forever I have used the following to run an external command on a Winders box: `cluster group "$Name"` (where name is the name of the cluster group in question) 1. Why use backtick? Try system("cluster group $Name"); 2. Why put $Name in a double quote? But today I had to run a script which works on previous versions of Windows, is failing on Windows 2008 R2.. Debuging the command, I see the command is coming back "cluster" command not found.. OK so I tell myself, R2 doesn't have the correct path, and so I added the fully qualified path, including adding the ".exe" at the end of the local command name (i.e. `c:\\windows\\system32\\cluster.exe group group "$Name"`;).. Still same problem.. Any ideas why this is failing in Windows 2008 R2?? I don't use Windows 2008 R2, try the above and if that doesn't work you might have to state the error message you are getting. Flk k -- Tim