Deploy software through KACE K1000 is really easy but how we can deploy a software that has multiple installers each for every platform (Windows XP & Windows 7) and architecture (x64 & x86)?

I realized a script that helps you to detect the architecure and the platform.

 
@echo off
if %PROCESSOR_ARCHITECTURE% ==x86 (
goto :x86
)
else (
goto :x64
)

:x86
if exist "C:\Users\All Users\ntuser.dat" goto win7x86
if exist "C:\Documents and Settings\All Users\ntuser.dat" goto winxpx86
goto osnotdetected

:win7x86
REM Place here the installer command for Windows 7 or Vista 32bit
SetupForWin7x86.exe /S
goto :eof

:winxpx86
REM Place here the installer command for XP 32bit
SetupForXPx86.exe /S
goto :eof

:x64
if exist "C:\Users\All Users\ntuser.dat" goto win7x64
if exist "C:\Documents and Settings\All Users\ntuser.dat" goto winxpx64
goto osnotdetected

:win7x64
REM Place here the installer command for Windows 7 or Vista 64bit
SetupForWindows7x64.exe /S

:winxpx64
REM Place here the installer command for Windows XP 64bit
SetupForWindowsXPx64.exe /S
goto :eof

:osnotdetected
Echo I have no idea what OS is this one
REM The end

Caveats:

  • The script is given AS IS. You need to test it and adapt it to you needs before to adopt it.
  • The script bases the decision about the OS (XP or Vista/7) based on the presence of a system file in a specifc path: if your OS language is not English you may need to refurbish it a bit...