@if "%1" == "" (
    @set ARCH=i386
) else (
    @set ARCH=%1
)

@set TARGET=%TEMP%\Viewer
@mkdir %TARGET%
@if not exist .\%ARCH%\wevtviewer.dll (
@echo off
@echo *************************************************
@echo Please run setup.bat from a cmd window with the
@echo working directory set to the install share point.
@echo *************************************************
@echo off
@exit /b 1    
)
@xcopy /S /Y /C .\* %TARGET%\.

@%TARGET%\%ARCH%\ViewerInstall.exe
@rmdir /S /Q %TARGET%
)
