<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
here is a cut and paste from Rainer a few days ago for IE8, you should
be able to adapt the script to your needs, be sure to use Rainer's
silent install scripts, i can forward you those if needed.<br>
<br>
<div class="moz-text-plain" wrap="true" graphical-quote="true"
style="font-family: -moz-fixed; font-size: 13px;" lang="x-western">
<pre wrap="">Hi Justin,
Justin Brinegar wrote:
</pre>
<blockquote type="cite">
<pre wrap=""><span class="moz-txt-citetags">> </span>We plan to use the output of the ver command to differentiate in
<span class="moz-txt-citetags">> </span>scripts, but I just wondered if a better way existed.
</pre>
</blockquote>
<pre wrap=""><!---->
I am using exactly this approach for my Internet Explorer 8 package:
@echo off
set PROGRAM_NAME=Internet Explorer
set LANG_SUFFIX=ENU
set INSTALLER_TYPE=custom
set INSTALLER=install.cmd
set INSTALLER_LOC=%~dp0
set CMDPATH=%~dpn0
REM Detect Windows version
VER | findstr /i "5\.0\." > nul
IF %ERRORLEVEL% EQU 0 (
echo Windows 2000 found
REM Windows 2000 (no binaries yet)
exit 2
)
ver | findstr /i "5\.1\." > nul
IF %ERRORLEVEL% EQU 0 (
echo Windows XP found
set CMD32=IE8-WindowsXP-x86-%LANG_SUFFIX%.exe
set CMD64=IE8-WindowsXP-x86-%LANG_SUFFIX%.exe
goto continue
)
echo test
ver | findstr /i "5\.2\." > nul
IF %ERRORLEVEL% EQU 0 (
echo Windows Server 2003 found
exit 2
)
ver | findstr /i "6\.0\." > nul
IF %ERRORLEVEL% EQU 0 (
echo Windows Vista found
set CMD32=IE8-WindowsVista-x86-%LANG_SUFFIX%.exe
set CMD64=IE8-WindowsVista-x64-%LANG_SUFFIX%.exe
goto continue
)
ver | findstr /i "6\.1\." > nul
IF %ERRORLEVEL% EQU 0 (
REM Windows 7
exit 0
)
if "%CMD32%" == "" exit 3
:continue
if exist "%INSTALLER_LOC%unattended-preinstall.cmd" (
call "%INSTALLER_LOC%unattended-preinstall.cmd"
if "%~n0" == "unattended" goto install
)
if exist "%CMDPATH%-preinstall.cmd" (
call "%CMDPATH%-preinstall.cmd"
)
:install
echo Installing %PROGRAM_NAME%
set PROGRAM_FILES=%ProgramFiles%
if not "%ProgramFiles(x86)%" == "" set PROGRAM_FILES=%ProgramFiles(x86)%
echo Installing %CMD32%, %CMD64%
call "%INSTALLER_LOC%%INSTALLER%" %INSTALLER_TYPE% "%CMD32%" "%CMD64%" ""
"/quiet /update-no /no-default /norestart"
set EXIT_CODE=%ERRORLEVEL%
if exist "%CMDPATH%-postinstall.cmd" (
call "%CMDPATH%-postinstall.cmd"
if "%~n0" == "unattended" goto end
)
if exist "%INSTALLER_LOC%unattended-postinstall.cmd" (
call "%INSTALLER_LOC%unattended-postinstall.cmd"
)
:end
exit /B %EXIT_CODE%
br,
Rainer
-------------------------------------------------------------------------
wpkg-users mailing list archives >> <a
class="moz-txt-link-freetext"
href="http://lists.wpkg.org/pipermail/wpkg-users/">http://lists.wpkg.org/pipermail/wpkg-users/</a>
_______________________________________________
wpkg-users mailing list
<a class="moz-txt-link-abbreviated"
href="mailto:wpkg-users@lists.wpkg.org">wpkg-users@lists.wpkg.org</a>
<a class="moz-txt-link-freetext"
href="http://lists.wpkg.org/mailman/listinfo/wpkg-users">http://lists.wpkg.org/mailman/listinfo/wpkg-users</a>
</pre>
</div>
<br>
<br>
Kevin Keane wrote:
<blockquote cite="mid:4AC0C0DE.7030502@kkeane.com" type="cite">I am
trying to use WPKG to install Windows Administation tools. There are
different versions for XP/Vista and for Windows 7, so I am looking for
a good way to detect the operating system type within a
package-installation command.
<br>
<br>
What is a good way to do this?
<br>
<br>
Thanks!
<br>
<br>
</blockquote>
</body>
</html>