@rem This script is intended to be run from the location it was binplaced

@if "%1" == "" (
    @echo "Usage: CreateStandAloneInstall <TargetDirPath> [i386|ia64|amd64]" 
    exit /b 1    
)

@set TARGET=%1

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


@mkdir %TARGET%
@mkdir %TARGET%\%ARCH%
 
@xcopy /Y /C setup.bat %TARGET%
@xcopy /Y /C %_NTDRIVE%\%_NTROOT%\public\sdk\ref\Microsoft.Config.Engine.dll %TARGET%\%ARCH%
@xcopy /Y /C %_NTDRIVE%\%_NTROOT%\admin\wmi\events\Viewer\Install\obj\%ARCH%\ViewerInstall.exe %TARGET%\%ARCH%
@cscript CopyViewer.vbs %_NTTREE% %RazzleToolPath% %TARGET% %ARCH%
