You guys seem to have missed this - it's a more appropriate way to tell if a system is 32 or 64 bit:
 Code:
$Is64 = IIf(InStr('%PROCESSOR_ARCHITECTURE% %PROCESSOR_ARCHITEW6432%', 'AMD64'), 1, 0)
This returns 1 (true) if either the environment variables contain AMD64, and 0 (false) if they don't. These are set when running on an x64 platform by the operating system. The presence (or absence) of a directory is arbitrary - I can have a 32-bit O/S and nothing will stop me from creating a folder called "Program Files(X86)", whereupon your logic will fail.

JSosa - note the extra "I" in the statement - it's an "Immediate If" and works much like an IF in Excel - IIf(test,true_value,false_value). So - if "AMD64" is found in the string that's comprised of the two environment variables, it returns 1, otherwise returns 0. It's the only way to return a value from an IF statement.

The code example I posted should work with minor modifications to the values in the $Install definitions. I changed the InGroup to reference "Domain Users" and it worked on both 32 and 64 bit platforms, and when using the Lync Users group (which I don't have) it displayed "No Lync for you!".

Here's the code updated to prevent the install if it already exists - just change the $Install variable definitions and the If Exist() path specifications to meet your needs.
 Code:
Break On


$SystemDrive = Left('%WINDIR%', 2)
$InstRoot = 'S:\Lync\'

$Is64 = IIf(InStr('%PROCESSOR_ARCHITECTURE% %PROCESSOR_ARCHITEW6432%', 'AMD64'), 1, 0)

$Install = ''				; default is to not install

If InGroup('Domain Users')
  ; OK to Instal Lync
  ; set the installer based on the platform bitness, but only if the appropriate
  ; Lync version is not already installed
  If $Is64				; running on x64 platform
    If Not Exist(Path_to\64-bit\Lync)
      $Install = 'setup.exe /configure configuration-en-64.xml'
    EndIf
  Else
    If Not Exist(Path_to\32-bit\Lync)
      $Install = 'setup.exe /configure configuration-en-86.xml'
    EndIf
  EndIf

  ; run the installer only if it was defined above. If not defined, it's already here!
  If $Install
    'Running: ' $InstRoot $Install @CRLF
    ; Shell $InstRoot + $Install
  Else
    'Lync is already installed!' @CRLF
  EndIf
Else
  'No Lync for you!' @CRLF
EndIf
Also, I'd use Shell instead of Run so you can continue processing and log the success or failure of the installation. You have no ability to do this with Run - @ERROR just tells you if the command started successfully, not whether it completed successfully, which is usually more important.

Check out my Kix UDF library, which is updated nightly (using Kix!) with the latest versions of all my functions. I do a lot of commercial systems management development with Kix and you'll find a lot of useful functions there.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D