REM Interim script to assist in building Windows images until Docker Hub auto builds support Windows

Set DOTNET_SDK_VERSION=1.0.0-preview2
Set DOTNET_VERSION=1.0.0

IF NOT DEFINED REPO_OWNER (
    set REPO_OWNER=microsoft
)

IF DEFINED NANO_SERVER (
    pushd %DOTNET_SDK_VERSION%\nanoserver
    docker build -t %REPO_OWNER%/dotnet:nanoserver . || goto :error
    docker tag %REPO_OWNER%/dotnet:nanoserver %REPO_OWNER%/dotnet:%DOTNET_SDK_VERSION%-nanoserver-sdk || goto :error
    popd

    pushd %DOTNET_SDK_VERSION%\nanoserver\onbuild
    docker build -t %REPO_OWNER%/dotnet:nanoserver-onbuild . || goto :error
    docker tag %REPO_OWNER%/dotnet:nanoserver-onbuild %REPO_OWNER%/dotnet:%DOTNET_SDK_VERSION%-nanoserver-onbuild || goto :error
    popd

    pushd %DOTNET_VERSION%\nanoserver\core
    docker build -t %REPO_OWNER%/dotnet:nanoserver-core . || goto :error
    docker tag %REPO_OWNER%/dotnet:nanoserver-core %REPO_OWNER%/dotnet:%DOTNET_VERSION%-nanoserver-core || goto :error
    popd
) ELSE (
    pushd %DOTNET_SDK_VERSION%\windowsservercore
    docker build -t %REPO_OWNER%/dotnet:windowsservercore . || goto :error
    docker tag %REPO_OWNER%/dotnet:windowsservercore %REPO_OWNER%/dotnet:%DOTNET_SDK_VERSION%-windowsservercore-sdk || goto :error
    popd

    pushd %DOTNET_SDK_VERSION%\windowsservercore\onbuild
    docker build -t %REPO_OWNER%/dotnet:windowsservercore-onbuild . || goto :error
    docker tag %REPO_OWNER%/dotnet:windowsservercore-onbuild %REPO_OWNER%/dotnet:%DOTNET_SDK_VERSION%-windowsservercore-onbuild || goto :error
    popd

    pushd %DOTNET_VERSION%\windowsservercore\core
    docker build -t %REPO_OWNER%/dotnet:windowsservercore-core . || goto :error
    docker tag %REPO_OWNER%/dotnet:windowsservercore-core %REPO_OWNER%/dotnet:%DOTNET_VERSION%-windowsservercore-core || goto :error
    popd

goto :EOF

:error
popd
exit /B 1

REM Interim script to assist in building Windows images until Docker Hub auto builds support Windows

Set DOTNET_SDK_VERSION=1.0.0-preview2
Set DOTNET_VERSION=1.0.0

IF NOT DEFINED REPO_OWNER (
    set REPO_OWNER=microsoft
)

IF DEFINED NANO_SERVER (
    pushd %DOTNET_SDK_VERSION%\nanoserver
    docker build -t %REPO_OWNER%/dotnet:nanoserver . || goto :error
    docker tag %REPO_OWNER%/dotnet:nanoserver %REPO_OWNER%/dotnet:%DOTNET_SDK_VERSION%-nanoserver-sdk || goto :error
    popd

    pushd %DOTNET_SDK_VERSION%\nanoserver\onbuild
    docker build -t %REPO_OWNER%/dotnet:nanoserver-onbuild . || goto :error
    docker tag %REPO_OWNER%/dotnet:nanoserver-onbuild %REPO_OWNER%/dotnet:%DOTNET_SDK_VERSION%-nanoserver-onbuild || goto :error
    popd

    pushd %DOTNET_VERSION%\nanoserver\core
    docker build -t %REPO_OWNER%/dotnet:nanoserver-core . || goto :error
    docker tag %REPO_OWNER%/dotnet:nanoserver-core %REPO_OWNER%/dotnet:%DOTNET_VERSION%-nanoserver-core || goto :error
    popd
) ELSE (
    pushd %DOTNET_SDK_VERSION%\windowsservercore
    docker build -t %REPO_OWNER%/dotnet:windowsservercore . || goto :error
    docker tag %REPO_OWNER%/dotnet:windowsservercore %REPO_OWNER%/dotnet:%DOTNET_SDK_VERSION%-windowsservercore-sdk || goto :error
    popd

    pushd %DOTNET_SDK_VERSION%\windowsservercore\onbuild
    docker build -t %REPO_OWNER%/dotnet:windowsservercore-onbuild . || goto :error
    docker tag %REPO_OWNER%/dotnet:windowsservercore-onbuild %REPO_OWNER%/dotnet:%DOTNET_SDK_VERSION%-windowsservercore-onbuild || goto :error
    popd

    pushd %DOTNET_VERSION%\windowsservercore\core
    docker build -t %REPO_OWNER%/dotnet:windowsservercore-core . || goto :error
    docker tag %REPO_OWNER%/dotnet:windowsservercore-core %REPO_OWNER%/dotnet:%DOTNET_VERSION%-windowsservercore-core || goto :error
    popd
)

goto :EOF

:error
popd
exit /B 1

Add missing parenthesis in BuildWindowsImages.cmd


@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
	set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=../..
set BUILDDIR=../../build
set SPHINXPROJ=SimpleITK

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
	echo.
	echo.The Sphinx module was not found. Make sure you have Sphinx installed,
	echo.then set the SPHINXBUILD environment variable to point to the full
	echo.path of the 'sphinx-build' executable. Alternatively you may add the
	echo.Sphinx directory to PATH.
	echo.
	echo.If you don't have Sphinx installed, grab it from
	echo.http://sphinx-doc.org/
	exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%

:end
popd

Include make.bat for building Sphinx docs on Windows

Include make.bat file to allow for building documentation via Sphinx on
Windows. This file is directly modelled from the make.bat generated by
`sphinx-quickstart`.


@echo OFF
@setlocal enabledelayedexpansion

set VERSION=1.25.0
set TFDIR=C:\TreeFrog\%VERSION%
set MONBOC_VERSION=1.14.0
set LZ4_VERSION=1.9.1

:parse_loop
if "%1" == "" goto :start
if /i "%1" == "--prefix" goto :prefix
if /i "%1" == "--enable-debug" goto :enable_debug
if /i "%1" == "--enable-gui-mod" goto :enable_gui_mod
if /i "%1" == "--help" goto :help
if /i "%1" == "-h" goto :help
goto :help
:continue
shift
goto :parse_loop

:help
  echo Usage: %0 [OPTION]... [VAR=VALUE]...
  echo;
  echo Configuration:
  echo   -h, --help          display this help and exit
  echo   --enable-debug      compile with debugging information
  echo   --enable-gui-mod    compile and link with QtGui module
  echo;
  echo Installation directories:
  echo   --prefix=PREFIX     install files in PREFIX [%TFDIR%]
  goto :exit

:prefix
  shift
  if "%1" == "" goto :help
  set TFDIR=%1
  goto :continue

:enable_debug
  set DEBUG=yes
  goto :continue

:enable_gui_mod
  set USE_GUI=use_gui=1
  goto :continue

:start
if "%DEBUG%" == "yes" (
  set OPT="CONFIG+=debug"
) else (
  set OPT="CONFIG+=release"
)

::
:: Generates tfenv.bat
::
for %%I in (qmake.exe) do if exist %%~$path:I set QMAKE=%%~$path:I
for %%I in (cl.exe) do if exist %%~$path:I set MSCOMPILER=%%~$path:I
for %%I in (g++.exe) do if exist %%~$path:I set GNUCOMPILER=%%~$path:I

if "%QMAKE%" == "" (
  echo Qt environment not found
  exit /b
)
if "%MSCOMPILER%" == "" if "%GNUCOMPILER%"  == "" (
  echo compiler not found
  exit /b
)

:: vcvarsall.bat setup
if not "%MSCOMPILER%" == "" (
  set MAKE=nmake
  if not "%Platform%" == "X64" if not "%Platform%" == "x64" (
    set VCVARSOPT=x86
    set BUILDTARGET=win32
    set ENVSTR=Environment to build for 32-bit executable  MSVC / Qt
  ) else (
    set VCVARSOPT=amd64
    set BUILDTARGET=x64
    set ENVSTR=Environment to build for 64-bit executable  MSVC / Qt
  )

  for /F %%i in ('qtpaths.exe --install-prefix') do set QT_INSTALL_PREFIX=%%i
  echo !QT_INSTALL_PREFIX! | find "msvc2015" >NUL
  if not ERRORLEVEL 1 (
    if "!BUILDTARGET!" == "x64" (
      set CMAKEOPT=Visual Studio 14 2015 Win64
    ) else (
      set CMAKEOPT=Visual Studio 14 2015
    )
  ) else (
    if "!BUILDTARGET!" == "x64" (
      set CMAKEOPT=Visual Studio 15 2017 Win64
    ) else (
      set CMAKEOPT=Visual Studio 15 2017
    )
  )
) else (
  set MAKE=mingw32-make -j%NUMBER_OF_PROCESSORS%
  set ENVSTR=Environment to build for executable MinGW / Qt
)
SET /P X="%ENVSTR%"<NUL
qtpaths.exe --qt-version

for %%I in (qtenv2.bat) do if exist %%~$path:I set QTENV=%%~$path:I
set TFENV=tfenv.bat
echo @echo OFF> %TFENV%
echo ::>> %TFENV%
echo :: This file is generated by configure.bat>> %TFENV%
echo ::>> %TFENV%
echo;>> %TFENV%
echo set TFDIR=%TFDIR%>> %TFENV%
echo set TreeFrog_DIR=%TFDIR%>> %TFENV%
echo set QTENV="%QTENV%">> %TFENV%
echo set QMAKESPEC=%QMAKESPEC%>> %TFENV%
echo if exist %%QTENV%% ( call %%QTENV%% )>> %TFENV%
if not "%VCVARSOPT%" == "" (
  echo if not "%%VS140COMNTOOLS%%" == "" ^(>> %TFENV%
  echo   set VCVARSBAT="%%VS140COMNTOOLS%%..\..\VC\vcvarsall.bat">> %TFENV%
  echo ^) else if not "%%VS120COMNTOOLS%%" == "" ^(>> %TFENV%
  echo   set VCVARSBAT="%%VS120COMNTOOLS%%..\..\VC\vcvarsall.bat">> %TFENV%
  echo ^) else ^(>> %TFENV%
  echo   set VCVARSBAT="">> %TFENV%
  echo ^)>> %TFENV%
  echo if exist %%VCVARSBAT%% ^(>> %TFENV%
  echo   echo Setting up environment for MSVC usage...>> %TFENV%
  echo   call %%VCVARSBAT%% %VCVARSOPT%>> %TFENV%
  echo ^)>> %TFENV%
)
echo set PATH=%%TFDIR^%%\bin;%%PATH%%>> %TFENV%
echo echo Setup a TreeFrog/Qt environment.>> %TFENV%
echo echo -- TFDIR set to %%TFDIR%%>> %TFENV%
echo cd /D %%HOMEDRIVE%%%%HOMEPATH%%>> %TFENV%

set TFDIR=%TFDIR:\=/%
:: Builds MongoDB driver
echo Compiling MongoDB driver library ...
cd 3rdparty
rd /s /q  mongo-driver >nul 2>&1
del /f /q mongo-driver >nul 2>&1
mklink /j mongo-driver mongo-c-driver-%MONBOC_VERSION% >nul 2>&1
cd mongo-driver
rmdir /s /q cmake-build >nul 2>&1
mkdir cmake-build
cd cmake-build
cmake -G"%CMAKEOPT%" -DCMAKE_CONFIGURATION_TYPES=Release -DENABLE_SSL=OFF -DENABLE_SNAPPY=OFF -DENABLE_SRV=OFF -DENABLE_SASL=OFF -DENABLE_ZLIB=OFF ..
devenv mongo-c-driver.sln /project bson_static /rebuild Release
devenv mongo-c-driver.sln /project mongoc_static /rebuild Release
if ERRORLEVEL 1 (
  echo Build failed.
  echo MongoDB driver not available.
  exit /b
)

:: Builds LZ4
cd ..\..
echo Compiling LZ4 library ...
rd /s /q  lz4 >nul 2>&1
del /f /q lz4 >nul 2>&1
mklink /j lz4 lz4-%LZ4_VERSION% >nul 2>&1
if not "%MSCOMPILER%" == "" (
  for /F %%i in ('qtpaths.exe --install-prefix') do echo %%i | find "msvc2015" >NUL
  if not ERRORLEVEL 1 (
    devenv lz4\visual\VS2015\lz4.sln /project liblz4 /rebuild "Release|%BUILDTARGET%"
  ) else (
    devenv lz4\visual\VS2017\lz4.sln /project liblz4 /rebuild "Release|%BUILDTARGET%"
  )
  if ERRORLEVEL 1 (
    echo Build failed.
    echo LZ4 not available.
    exit /b
  )
) else (
  cd lz4\lib
  qmake -o makefile.liblz4
  %MAKE% -f makefile.liblz4 clean
  %MAKE% -f makefile.liblz4
  cd ..\..
)
cd ..

cd src
if exist Makefile ( %MAKE% -k distclean >nul 2>&1 )
qmake %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' %USE_GUI%
cd ..
cd tools
if exist Makefile ( %MAKE% -k distclean >nul 2>&1 )
qmake -recursive %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' datadir='%TFDIR%'
%MAKE% qmake
cd ..

echo;
echo First, run "%MAKE% install" in src directory.
echo Next, run "%MAKE% install" in tools directory.

:exit
exit /b

@echo OFF
@setlocal enabledelayedexpansion

set VERSION=1.25.0
set TFDIR=C:\TreeFrog\%VERSION%
set MONBOC_VERSION=1.14.0
set LZ4_VERSION=1.9.1

:parse_loop
if "%1" == "" goto :start
if /i "%1" == "--prefix" goto :prefix
if /i "%1" == "--enable-debug" goto :enable_debug
if /i "%1" == "--enable-gui-mod" goto :enable_gui_mod
if /i "%1" == "--help" goto :help
if /i "%1" == "-h" goto :help
goto :help
:continue
shift
goto :parse_loop

:help
  echo Usage: %0 [OPTION]... [VAR=VALUE]...
  echo;
  echo Configuration:
  echo   -h, --help          display this help and exit
  echo   --enable-debug      compile with debugging information
  echo   --enable-gui-mod    compile and link with QtGui module
  echo;
  echo Installation directories:
  echo   --prefix=PREFIX     install files in PREFIX [%TFDIR%]
  goto :exit

:prefix
  shift
  if "%1" == "" goto :help
  set TFDIR=%1
  goto :continue

:enable_debug
  set DEBUG=yes
  goto :continue

:enable_gui_mod
  set USE_GUI=use_gui=1
  goto :continue

:start
if "%DEBUG%" == "yes" (
  set OPT="CONFIG+=debug"
) else (
  set OPT="CONFIG+=release"
)

::
:: Generates tfenv.bat
::
for %%I in (qmake.exe) do if exist %%~$path:I set QMAKE=%%~$path:I
for %%I in (cl.exe) do if exist %%~$path:I set MSCOMPILER=%%~$path:I
for %%I in (g++.exe) do if exist %%~$path:I set GNUCOMPILER=%%~$path:I

if "%QMAKE%" == "" (
  echo Qt environment not found
  exit /b
)
if "%MSCOMPILER%" == "" if "%GNUCOMPILER%"  == "" (
  echo compiler not found
  exit /b
)

:: vcvarsall.bat setup
if not "%MSCOMPILER%" == "" (
  set MAKE=nmake
  if not "%Platform%" == "X64" if not "%Platform%" == "x64" (
    set VCVARSOPT=x86
    set BUILDTARGET=win32
    set ENVSTR=Environment to build for 32-bit executable  MSVC / Qt
  ) else (
    set VCVARSOPT=amd64
    set BUILDTARGET=x64
    set ENVSTR=Environment to build for 64-bit executable  MSVC / Qt
  )

  for /F %%i in ('qtpaths.exe --install-prefix') do set QT_INSTALL_PREFIX=%%i
  echo !QT_INSTALL_PREFIX! | find "msvc2015" >NUL
  if not ERRORLEVEL 1 (
    if "!BUILDTARGET!" == "x64" (
      set CMAKEOPT=Visual Studio 14 2015 Win64
    ) else (
      set CMAKEOPT=Visual Studio 14 2015
    )
  ) else (
    if "!BUILDTARGET!" == "x64" (
      set CMAKEOPT=Visual Studio 15 2017 Win64
    ) else (
      set CMAKEOPT=Visual Studio 15 2017
    )
  )
) else (
  set MAKE=mingw32-make -j%NUMBER_OF_PROCESSORS%
  set ENVSTR=Environment to build for executable MinGW / Qt
)
SET /P X="%ENVSTR%"<NUL
qtpaths.exe --qt-version

for %%I in (qtenv2.bat) do if exist %%~$path:I set QTENV=%%~$path:I
set TFENV=tfenv.bat
echo @echo OFF> %TFENV%
echo ::>> %TFENV%
echo :: This file is generated by configure.bat>> %TFENV%
echo ::>> %TFENV%
echo;>> %TFENV%
echo set TFDIR=%TFDIR%>> %TFENV%
echo set TreeFrog_DIR=%TFDIR%>> %TFENV%
echo set QTENV="%QTENV%">> %TFENV%
echo set QMAKESPEC=%QMAKESPEC%>> %TFENV%
echo if exist %%QTENV%% ( call %%QTENV%% )>> %TFENV%
if not "%VCVARSOPT%" == "" (
  echo if not "%%VS140COMNTOOLS%%" == "" ^(>> %TFENV%
  echo   set VCVARSBAT="%%VS140COMNTOOLS%%..\..\VC\vcvarsall.bat">> %TFENV%
  echo ^) else if not "%%VS120COMNTOOLS%%" == "" ^(>> %TFENV%
  echo   set VCVARSBAT="%%VS120COMNTOOLS%%..\..\VC\vcvarsall.bat">> %TFENV%
  echo ^) else ^(>> %TFENV%
  echo   set VCVARSBAT="">> %TFENV%
  echo ^)>> %TFENV%
  echo if exist %%VCVARSBAT%% ^(>> %TFENV%
  echo   echo Setting up environment for MSVC usage...>> %TFENV%
  echo   call %%VCVARSBAT%% %VCVARSOPT%>> %TFENV%
  echo ^)>> %TFENV%
)
echo set PATH=%%TFDIR^%%\bin;%%PATH%%>> %TFENV%
echo echo Setup a TreeFrog/Qt environment.>> %TFENV%
echo echo -- TFDIR set to %%TFDIR%%>> %TFENV%
echo cd /D %%HOMEDRIVE%%%%HOMEPATH%%>> %TFENV%

set TFDIR=%TFDIR:\=/%
:: Builds MongoDB driver
echo Compiling MongoDB driver library ...
cd 3rdparty
rd /s /q  mongo-driver >nul 2>&1
del /f /q mongo-driver >nul 2>&1
mklink /j mongo-driver mongo-c-driver-%MONBOC_VERSION% >nul 2>&1
cd mongo-driver
rmdir /s /q cmake-build >nul 2>&1
mkdir cmake-build
cd cmake-build
echo cmake -G"%CMAKEOPT%" -DCMAKE_CONFIGURATION_TYPES=Release -DENABLE_SSL=OFF -DENABLE_SNAPPY=OFF -DENABLE_SRV=OFF -DENABLE_SASL=OFF -DENABLE_ZLIB=OFF ..
cmake -G"%CMAKEOPT%" -DCMAKE_CONFIGURATION_TYPES=Release -DENABLE_SSL=OFF -DENABLE_SNAPPY=OFF -DENABLE_SRV=OFF -DENABLE_SASL=OFF -DENABLE_ZLIB=OFF ..
devenv mongo-c-driver.sln /project bson_static /rebuild Release
devenv mongo-c-driver.sln /project mongoc_static /rebuild Release
if ERRORLEVEL 1 (
  echo Build failed.
  echo MongoDB driver not available.
  exit /b
)

:: Builds LZ4
cd ..\..
echo Compiling LZ4 library ...
rd /s /q  lz4 >nul 2>&1
del /f /q lz4 >nul 2>&1
mklink /j lz4 lz4-%LZ4_VERSION% >nul 2>&1
if not "%MSCOMPILER%" == "" (
  for /F %%i in ('qtpaths.exe --install-prefix') do echo %%i | find "msvc2015" >NUL
  if not ERRORLEVEL 1 (
    devenv lz4\visual\VS2015\lz4.sln /project liblz4 /rebuild "Release|%BUILDTARGET%"
  ) else (
    devenv lz4\visual\VS2017\lz4.sln /project liblz4 /rebuild "Release|%BUILDTARGET%"
  )
  if ERRORLEVEL 1 (
    echo Build failed.
    echo LZ4 not available.
    exit /b
  )
) else (
  cd lz4\lib
  qmake -o makefile.liblz4
  %MAKE% -f makefile.liblz4 clean
  %MAKE% -f makefile.liblz4
  cd ..\..
)
cd ..

cd src
if exist Makefile ( %MAKE% -k distclean >nul 2>&1 )
qmake %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' %USE_GUI%
cd ..
cd tools
if exist Makefile ( %MAKE% -k distclean >nul 2>&1 )
qmake -recursive %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' datadir='%TFDIR%'
%MAKE% qmake
cd ..

echo;
echo First, run "%MAKE% install" in src directory.
echo Next, run "%MAKE% install" in tools directory.

:exit
exit /b

update bat file.

update bat file.


md assets\Data
xcopy ..\..\Bin\Data\*.* assets\Data /S /E /C /Y
xcopy ..\..\Bin\*.json assets /S /E /C /Y
rd /S /Q assets\Data\Shaders\HLSL

md assets\Data
md assets\Scenes
md assets\Assets
xcopy ..\..\Bin\Data\*.* assets\Data /S /E /C /Y
xcopy ..\..\Bin\Scenes\*.* assets\Scenes /S /E /C /Y
xcopy ..\..\Bin\Assets\*.* assets\Assets /S /E /C /Y
xcopy ..\..\Bin\*.json assets /S /E /C /Y
rd /S /Q assets\Data\Shaders\HLSL

Copy also Scenes & Assets directories to apk.


REM   Copyright (c) 2011 The WebM project authors. All Rights Reserved.
REM
REM   Use of this source code is governed by a BSD-style license
REM   that can be found in the LICENSE file in the root of the source
REM   tree. An additional intellectual property rights grant can be found
REM   in the file PATENTS.  All contributing project authors may
REM   be found in the AUTHORS file in the root of the source tree.
echo on

cl /I "./" /I "%1" /nologo /c "%1/vp9/common/asm_com_offsets.c"
cl /I "./" /I "%1" /nologo /c "%1/vp9/decoder/asm_dec_offsets.c"
cl /I "./" /I "%1" /nologo /c "%1/vp9/encoder/asm_enc_offsets.c"
obj_int_extract.exe rvds "asm_com_offsets.obj" > "asm_com_offsets.asm"
obj_int_extract.exe rvds "asm_dec_offsets.obj" > "asm_dec_offsets.asm"
obj_int_extract.exe rvds "asm_enc_offsets.obj" > "asm_enc_offsets.asm"

REM   Copyright (c) 2011 The WebM project authors. All Rights Reserved.
REM
REM   Use of this source code is governed by a BSD-style license
REM   that can be found in the LICENSE file in the root of the source
REM   tree. An additional intellectual property rights grant can be found
REM   in the file PATENTS.  All contributing project authors may
REM   be found in the AUTHORS file in the root of the source tree.
echo on

cl /I "./" /I "%1" /nologo /c "%1/vp9/common/asm_com_offsets.c"
cl /I "./" /I "%1" /nologo /c "%1/vp9/decoder/asm_dec_offsets.c"
cl /I "./" /I "%1" /nologo /c "%1/vp9/encoder/asm_enc_offsets.c"
obj_int_extract.exe rvds "asm_com_offsets.obj" > "vp9_asm_com_offsets.asm"
obj_int_extract.exe rvds "asm_dec_offsets.obj" > "vp9_asm_dec_offsets.asm"
obj_int_extract.exe rvds "asm_enc_offsets.obj" > "vp9_asm_enc_offsets.asm"

enable build on windows with msvc

enable build on windows with msvc

Change-Id: I34057b87d9713dc819b8c69990dd1408b8c79342


@ECHO OFF
ECHO Make EXE From BAT
ECHO Written by: Jason Faulkner
ECHO SysadminGeek.com
ECHO.
ECHO.

REM Usage:
REM MakeExeFromBat BatFileToConvert [IncludeFile1] [IncludeFile2] [...]
REM
REM Required Parameters:
REM  BatFileToConvert
REM      Source batch file to use to produce the output Exe file.
REM
REM Optional Parameters:
REM  IncludeFile
REM      Additional files to include in the Exe file.
REM      You can include external tools used by the batch file so they are available on the executing machine.

SETLOCAL

REM Configuration (no quotes needed):
SET PathTo7Zip=

REM ---- Do not modify anything below this line ----

SET OutputFile="%~n1.exe"
SET SourceFiles="%TEMP%MakeEXE_files.txt"
SET Config="%TEMP%MakeEXE_config.txt"
SET Source7ZFile="%Temp%MakeEXE.7z"

REM Remove existing files
IF EXIST %OutputFile% DEL %OutputFile%

REM Build source archive
ECHO "%~dpnx1" > %SourceFiles%
:AddInclude
IF {%2}=={} GOTO EndInclude
ECHO "%~dpnx2" >> %SourceFiles%
SHIFT /2
GOTO AddInclude
:EndInclude
"%PathTo7Zip%7za.exe" a %Source7ZFile% @%SourceFiles%

REM Build config file
ECHO ;!@Install@!UTF-8! > %Config%
ECHO RunProgram="%~nx1" >> %Config%
ECHO ;!@InstallEnd@! >> %Config%

REM Build EXE
COPY /B "%PathTo7Zip%7zsd.sfx" + %Config% + %Source7ZFile% %OutputFile%

REM Clean up
IF EXIST %SourceFiles% DEL %SourceFiles%
IF EXIST %Config% DEL %Config%
IF EXIST %Source7ZFile% DEL %Source7ZFile%

ENDLOCAL

@ECHO OFF
SETLOCAL
SET PathTo7Zip=
SET OutputFile="%~n1.exe"
SET SourceFiles="%TEMP%MakeEXE_files.txt"
SET Config="%TEMP%MakeEXE_config.txt"
SET Source7ZFile="%Temp%MakeEXE.7z"
IF EXIST %OutputFile% DEL %OutputFile%
ECHO "%~dpnx1" > %SourceFiles%
:AddInclude
IF {%2}=={} GOTO EndInclude
ECHO "%~dpnx2" >> %SourceFiles%
SHIFT /2
GOTO AddInclude
:EndInclude
"%PathTo7Zip%7za.exe" a %Source7ZFile% @%SourceFiles%
ECHO ;!@Install@!UTF-8! > %Config%
ECHO RunProgram="%~nx1" >> %Config%
ECHO ;!@InstallEnd@! >> %Config%
COPY /B "%PathTo7Zip%7zsd.sfx" + %Config% + %Source7ZFile% %OutputFile%
IF EXIST %SourceFiles% DEL %SourceFiles%
IF EXIST %Config% DEL %Config%
IF EXIST %Source7ZFile% DEL %Source7ZFile%
ENDLOCAL

Update Bat2Exe.bat

Update Bat2Exe.bat


@echo off
echo.

:: Enable the delayed environment variable expansion needed in VSConfig.cmd.
setlocal EnableDelayedExpansion

call VSConfig.cmd %1

cd ..\..

:: Print user defined variables
cecho {0A}Script configuration:{# #}{\n}
echo CMake Generator   = %GENERATOR%

echo.

:: Add qmake from our downloaded Qt to PATH.
set PATH=%DEPS%\Qt\bin;%PATH%

SET BOOST_ROOT=%DEPS%\boost
SET QMAKESPEC=%QT_PLATFORM%
SET QTDIR=%DEPS%\qt
SET TUNDRA_DEP_PATH=%DEPS%
SET KNET_DIR=%DEPS%\kNet
SET BULLET_DIR=%DEPS%\bullet
SET OGRE_HOME=%DEPS%\ogre-safe-nocrashes\SDK
SET SKYX_HOME=%DEPS%\realxtend-tundra-deps\skyx
SET HYDRAX_HOME=%DEPS%\realxtend-tundra-deps\hydrax
SET PROTOBUF_SRC_ROOT_FOLDER=%DEPS%\protobuf
SET OPENSSL_ROOT_DIR=%DEPS%\openssl
SET CELT_ROOT=%DEPS%\celt
SET SPEEX_ROOT=%DEPS%\speex
SET VLC_ROOT=%DEPS%\vlc
SET QXMPP_ROOT=%DEPS%\qxmpp
SET ZZIPLIB_ROOT=%DEPS%\zziplib
SET CRUNCH_ROOT=%DEPS%\crunch
set TBB_HOME=%DEPS%\ogre-safe-nocrashes\Dependencies\tbb

:: Disable python until it has been fixed to BuildDeps.cmd!
SET TUNDRA_PYTHON_ENABLED=FALSE
IF %TUNDRA_PYTHON_ENABLED%==FALSE cecho {0E}Disabling Python from the build until deps are automated!{# #}{\n}
echo.

IF NOT EXIST Tundra.sln. (
   IF EXIST CMakeCache.txt. del /Q CMakeCache.txt
   cecho {0D}Running CMake for Tundra.{# #}{\n}
   cmake.exe -G %GENERATOR%
   IF NOT %ERRORLEVEL%==0 GOTO :ERROR
) ELSE (
   cecho {0A}Tundra.sln exists. Skipping CMake call for Tundra.{# #}{\n}
   cecho {0A}Delete %CD%\Tundra.sln to trigger a CMake rerun.{# #}{\n}
)
echo.

:: Finish in same directory we started in.
cd tools\Windows
set PATH=%ORIGINAL_PATH%
GOTO :EOF

:ERROR
echo.
cecho {0C}An error occurred! Aborting!{# #}{\n}
:: Finish in same directory we started in.
cd tools
set PATH=%ORIGINAL_PATH%
pause

endlocal

@echo off
echo.

:: Enable the delayed environment variable expansion needed in VSConfig.cmd.
setlocal EnableDelayedExpansion

call VSConfig.cmd %1

cd ..\..

:: Print user defined variables
cecho {0A}Script configuration:{# #}{\n}
echo CMake Generator   = %GENERATOR%

echo.

:: Add qmake from our downloaded Qt to PATH.
set PATH=%DEPS%\Qt\bin;%PATH%

SET BOOST_ROOT=%DEPS%\boost
SET QMAKESPEC=%QT_PLATFORM%
SET QTDIR=%DEPS%\qt
SET TUNDRA_DEP_PATH=%DEPS%
SET KNET_DIR=%DEPS%\kNet
SET BULLET_DIR=%DEPS%\bullet
SET OGRE_HOME=%DEPS%\ogre-safe-nocrashes\SDK
SET SKYX_HOME=%DEPS%\realxtend-tundra-deps\skyx
SET HYDRAX_HOME=%DEPS%\realxtend-tundra-deps\hydrax
SET PROTOBUF_SRC_ROOT_FOLDER=%DEPS%\protobuf
SET OPENSSL_ROOT_DIR=%DEPS%\openssl
SET CELT_ROOT=%DEPS%\celt
SET SPEEX_ROOT=%DEPS%\speex
SET VLC_ROOT=%DEPS%\vlc
SET QXMPP_ROOT=%DEPS%\qxmpp
SET ZZIPLIB_ROOT=%DEPS%\zziplib
SET CRUNCH_ROOT=%DEPS%\crunch
set TBB_HOME=%DEPS%\ogre-safe-nocrashes\Dependencies\tbb

IF NOT EXIST Tundra.sln. (
   IF EXIST CMakeCache.txt. del /Q CMakeCache.txt
   cecho {0D}Running CMake for Tundra.{# #}{\n}
   cmake.exe -G %GENERATOR%
   IF NOT %ERRORLEVEL%==0 GOTO :ERROR
) ELSE (
   cecho {0A}Tundra.sln exists. Skipping CMake call for Tundra.{# #}{\n}
   cecho {0A}Delete %CD%\Tundra.sln to trigger a CMake rerun.{# #}{\n}
)
echo.

:: Finish in same directory we started in.
cd tools\Windows
set PATH=%ORIGINAL_PATH%
GOTO :EOF

:ERROR
echo.
cecho {0C}An error occurred! Aborting!{# #}{\n}
:: Finish in same directory we started in.
cd tools
set PATH=%ORIGINAL_PATH%
pause

endlocal

remove Python print.

RunCMake.cmd: remove Python print.


@echo off
setlocal

set target_root=f:\apps\bin
call :ensure_target || exit /b 1
set cmd_args=

call :set_link false git			"%ProgramFiles%\Git\mingw64\bin\git.exe" "%ProgramFiles%\Git\bin\git.exe" "%ProgramFiles(x86)%\Git\bin\git.exe"
call :set_link false py			"%ProgramFiles(x86)%\Python 3.5\python.exe" "%ProgramFiles(x86)%\Python35-32\python.exe"
call :set_link true npp			"%ProgramFiles%\Notepad++\notepad++.exe" "%ProgramFiles(x86)%\Notepad++\notepad++.exe" "%windir%\system32\notepad.exe" "%windir%\notepad.exe"
call :set_link true windbg		"%SystemDrive%\debuggers\windbg.exe"
call :set_link true ewseditor	"%~d0\Apps\EWSEditor 1.17 - bin\EWSEditor.exe" "%~d0\Apps\EWSEditor 1.13 - bin\EWSEditor.exe"
call :set_link true ie			"%ProgramFiles%\Internet Explorer\iexplore.exe"
call :set_link true stylecopeditor "%ProgramFiles(x86)%\StyleCop 4.7\StyleCopSettingsEditor.exe"
call :set_link true snip			"%WINDIR%\system32\snippingtool.exe"
call :set_link true fiddler		"%ProgramFiles(x86)%\Fiddler2\Fiddler.exe"
call :set_link true ilspy		"%~d0\Apps\ILSpy\ILSpy.exe"
call :set_link true xts			"%~d0\Apps\xts\xts.exe"
call :set_link true chrome		"%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe"
call :set_link true paint		"%ProgramFiles%\Paint.NET\PaintDotNet.exe" "%windir%\system32\mspaint.exe"
call :set_link true rdm			"%ProgramFiles(x86)%\RedisDesktopManager\rdm.exe"
call :set_link true sourcetree		"%ProgramFiles(x86)%\Atlassian\SourceTree\SourceTree.exe"
call :set_link true azexplore		"%ProgramFiles(x86)%\Microsoft Azure Storage Explorer\StorageExplorer.exe"
call :set_link true moba		"%ProgramFiles(x86)%\Mobatek\MobaXterm Personal Edition\MobaXterm.exe"

set cmd_args=--processStart "slack.exe"
call :set_link true slack "%LOCALAPPDATA%\slack\Update.exe"
set cmd_args=

goto :eof

:ensure_target
	if exist "%target_root%" exit /b 0
	mkdir "%target_root%"
	if not exist "%target_root%" exit /b 1
	exit /b 0

:set_link
	set is_ui=%~1
	shift
	set link_name=%target_root%\%~1.cmd
	shift

	:loop_dest
	set link_dest=%~1
	if not defined link_dest goto :eof
	rem echo Checking: %link_dest%

	shift
	if not exist "%link_dest%" goto :loop_dest

	echo Creating link %link_dest% =^> %link_name%
	if /i "%is_ui%" equ "true" echo @start "" "%link_dest%" %cmd_args% %%^* > "%link_name%"
	if /i "%is_ui%" neq "true" echo @"%link_dest%" %cmd_args% %%^* > "%link_name%"

	goto :eof

@echo off
setlocal

set target_root=f:\apps\bin
call :ensure_target || exit /b 1
set cmd_args=

call :set_link false git			"%ProgramFiles%\Git\mingw64\bin\git.exe" "%ProgramFiles%\Git\bin\git.exe" "%ProgramFiles(x86)%\Git\bin\git.exe"
call :set_link false py			"%ProgramFiles(x86)%\Python 3.5\python.exe" "%ProgramFiles(x86)%\Python35-32\python.exe"
call :set_link false pip		"%ProgramFiles(x86)%\Python 3.5\Scripts\pip.exe" "%ProgramFiles(x86)%\Python35-32\Scripts\pip.exe"
call :set_link true npp			"%ProgramFiles%\Notepad++\notepad++.exe" "%ProgramFiles(x86)%\Notepad++\notepad++.exe" "%windir%\system32\notepad.exe" "%windir%\notepad.exe"
call :set_link true windbg		"%SystemDrive%\debuggers\windbg.exe"
call :set_link true ewseditor	"%~d0\Apps\EWSEditor 1.17 - bin\EWSEditor.exe" "%~d0\Apps\EWSEditor 1.13 - bin\EWSEditor.exe"
call :set_link true ie			"%ProgramFiles%\Internet Explorer\iexplore.exe"
call :set_link true stylecopeditor "%ProgramFiles(x86)%\StyleCop 4.7\StyleCopSettingsEditor.exe"
call :set_link true snip			"%WINDIR%\system32\snippingtool.exe"
call :set_link true fiddler		"%ProgramFiles(x86)%\Fiddler2\Fiddler.exe"
call :set_link true ilspy		"%~d0\Apps\ILSpy\ILSpy.exe"
call :set_link true xts			"%~d0\Apps\xts\xts.exe"
call :set_link true chrome		"%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe"
call :set_link true paint		"%ProgramFiles%\Paint.NET\PaintDotNet.exe" "%windir%\system32\mspaint.exe"
call :set_link true rdm			"%ProgramFiles(x86)%\RedisDesktopManager\rdm.exe"
call :set_link true sourcetree		"%ProgramFiles(x86)%\Atlassian\SourceTree\SourceTree.exe"
call :set_link true azexplore		"%ProgramFiles(x86)%\Microsoft Azure Storage Explorer\StorageExplorer.exe"
call :set_link true moba		"%ProgramFiles(x86)%\Mobatek\MobaXterm Personal Edition\MobaXterm.exe"

set cmd_args=--processStart "slack.exe"
call :set_link true slack "%LOCALAPPDATA%\slack\Update.exe"
set cmd_args=

goto :eof

:ensure_target
	if exist "%target_root%" exit /b 0
	mkdir "%target_root%"
	if not exist "%target_root%" exit /b 1
	exit /b 0

:set_link
	set is_ui=%~1
	shift
	set link_name=%target_root%\%~1.cmd
	shift

	:loop_dest
	set link_dest=%~1
	if not defined link_dest goto :eof
	rem echo Checking: %link_dest%

	shift
	if not exist "%link_dest%" goto :loop_dest

	echo Creating link %link_dest% =^> %link_name%
	if /i "%is_ui%" equ "true" echo @start "" "%link_dest%" %cmd_args% %%^* > "%link_name%"
	if /i "%is_ui%" neq "true" echo @"%link_dest%" %cmd_args% %%^* > "%link_name%"

	goto :eof

add pip link

add pip link


:: Copyright 2012 The Go Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style
:: license that can be found in the LICENSE file.
@echo off

setlocal

set GOBUILDFAIL=0

go tool dist env -wp >env.bat
if errorlevel 1 goto fail
call env.bat
del env.bat
echo.

if exist %GOTOOLDIR%\dist.exe goto distok
echo cannot find %GOTOOLDIR%\dist; nothing to clean
goto fail
:distok

"%GOBIN%\go" clean -i std
%GOTOOLDIR%\dist clean

goto end

:fail
set GOBUILDFAIL=1

:end
if x%GOBUILDEXIT%==x1 exit %GOBUILDFAIL%

implement clean.bat

build: implement clean.bat

Fixes issue 2893.

R=golang-dev, rsc
CC=golang-dev
http://codereview.appspot.com/5685047


set version=%1

runhaskell ..\BuildFromSource.hs %version%

mkdir files
mkdir files\bin
mkdir files\share
mkdir files\share\compiler
mkdir files\share\reactor

set platform=Elm-Platform\%version%

xcopy %platform%\bin\elm*.exe files\bin /s /e
xcopy %platform%\Elm\data\* files\share\compiler /s /e
xcopy %platform%\elm-reactor\assets\* files\share\reactor /s /e
xcopy updatepath.vbs files

"%ProgramFiles% (x86)\NSIS\makensis.exe" /DPLATFORM_VERSION=%version% Nsisfile.nsi

rd /s /q files

set version=%1

runhaskell ..\BuildFromSource.hs %version%

mkdir files
mkdir files\bin
mkdir files\share
mkdir files\share\compiler
mkdir files\share\reactor

set platform=Elm-Platform\%version%

xcopy %platform%\bin\elm*.exe files\bin /s /e
xcopy %platform%\Elm\data\* files\share\compiler /s /e
xcopy %platform%\elm-reactor\assets\* files\share\reactor /s /e
xcopy updatepath.vbs files

if EXIST "%ProgramFiles%" (
    set nsis=%ProgramFiles%\NSIS
) else (
    set nsis=%ProgramFiles(x86)%\NSIS
)

"%nsis%\makensis.exe" /DPLATFORM_VERSION=%version% Nsisfile.nsi

rd /s /q files

Solve the x86 vs not x86 issue for good

Solve the x86 vs not x86 issue for good


@echo off
rem dennyhalim.com
rem this will be copied after first reboot and then run after next reboot

#replace defaultlayouts before it gets created
move "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.dennyhalim"
copy /y "%WINDIR%\Setup\Files\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml"
move "%SystemRoot%\SysWOW64\OneDriveSetup.exe" "%SystemRoot%\SysWOW64\OneDriveSetup.dennyhalim"
move "%SystemRoot%\System32\OneDriveSetup.exe" "%SystemRoot%\System32\OneDriveSetup.dennyhalim"
rem move "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy" "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy.dennyhalim"
rem startmenu disabled if shellex disabled
rem move "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy" "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy.dennyhalim"

reg load HKLM\DEFAULT "%Public%\..\default\ntuser.dat"
reg add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackProgs /t REG_DWORD /d 1 /f
reg add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKLM\DEFAULT\Software\MicrosoftMicrosoft\Input\TIPC" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" /v GlobalUserDisabled /t REG_DWORD /d 1 /f
reg add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People /v PeopleBand /t REG_DWORD /d 0 /f
reg delete "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /F
reg unload HKLM\DEFAULT

reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferUpgrade /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v BranchReadinessLevel /t REG_DWORD /d 32 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdates /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdatesPeriodinDays /t REG_DWORD /d 365 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v AllowCortana /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseCredShared /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseOpen /t REG_DWORD /d 0 /f

rem cscript "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" a -m "Canon LBP2900" -i "%WINDIR%\Setup\Files\CanonLBP2900\CNAB4STD.inf"
rem cscript "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" a -m "Canon G2000 series Printer" -i "%WINDIR%\Setup\Files\CanonG2000\Driver\G2000P6.inf"
move "%WINDIR%\Setup\Drivers\*" "%WINDIR%\INF"

"%WINDIR%\Setup\Files\chocolatey.exe" /S
"%WINDIR%\Setup\Files\Firefox Setup 52.6.0esr.exe" -ms
"%WINDIR%\Setup\Files\vlc-3.0.1-win64.exe" /L=1033 /S
"%WINDIR%\Setup\Files\SumatraPDF-3.1.2-64-install.exe" /S
Msiexec /q /I "%WINDIR%\Setup\Files\7z1801-x64.msi"
Msiexec /q /I "%WINDIR%\Setup\Files\GoogleChromeStandaloneEnterprise64.msi"
Msiexec /q /I "%WINDIR%\Setup\Files\LibreOffice_5.4.6_Win_x64.msi"
rem "%WINDIR%\Setup\Files\avira_pc_cleaner_en.exe" /s
"%WINDIR%\Setup\Files\mb3-setup-consumer-3.4.5.2467-1.0.342-1.0.4664.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
"%WINDIR%\Setup\Files\avast_business_antivirus_managed_setup_offline_silent.exe"

mkdir "%Public%\Desktop.dennyhalim"
move "%Public%\Desktop\*.*" "%Public%\Desktop.dennyhalim"
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '%WINDIR%\Setup\Files\setup.ps1'"

rem "%WINDIR%\Setup-githubbox.exe"
rem rd /q /s "%WINDIR%\Setup\Files"
rem del /q /f "%0"

@echo off
rem dennyhalim.com
rem this will be copied after first reboot and then run after next reboot

#replace defaultlayouts before it gets created
move "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.dennyhalim"
copy /y "%WINDIR%\Setup\Files\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml"
move "%SystemRoot%\SysWOW64\OneDriveSetup.exe" "%SystemRoot%\SysWOW64\OneDriveSetup.dennyhalim"
move "%SystemRoot%\System32\OneDriveSetup.exe" "%SystemRoot%\System32\OneDriveSetup.dennyhalim"
rem move "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy" "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy.dennyhalim"
rem startmenu disabled if shellex disabled
rem move "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy" "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy.dennyhalim"

reg load HKLM\DEFAULT "%Public%\..\default\ntuser.dat"
reg add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackProgs /t REG_DWORD /d 1 /f
reg add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKLM\DEFAULT\Software\MicrosoftMicrosoft\Input\TIPC" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" /v GlobalUserDisabled /t REG_DWORD /d 1 /f
reg add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People /v PeopleBand /t REG_DWORD /d 0 /f
reg delete "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /F
reg unload HKLM\DEFAULT

reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferUpgrade /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v BranchReadinessLevel /t REG_DWORD /d 32 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdates /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdatesPeriodinDays /t REG_DWORD /d 365 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v AllowCortana /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseCredShared /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseOpen /t REG_DWORD /d 0 /f

cscript "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon LBP2900" -i "%WINDIR%\Setup\Files\CanonLBP2900\CNAB4STD.inf"
cscript "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon G2000 series Printer" -i "%WINDIR%\Setup\Files\CanonG2000\Driver\G2000P6.inf"
rem move "%WINDIR%\Setup\Drivers\*" "%WINDIR%\INF"

schtasks /change /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /DISABLE
schtasks /change /TN "\Microsoft\Windows\Application Experience\ProgramDataUpdater" /DISABLE
schtasks /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /DISABLE
schtasks /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /DISABLE
schtasks /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /DISABLE

"%WINDIR%\Setup\Files\chocolatey.exe" /S
"%WINDIR%\Setup\Files\Firefox Setup 52.6.0esr.exe" -ms
"%WINDIR%\Setup\Files\vlc-3.0.1-win64.exe" /L=1033 /S
"%WINDIR%\Setup\Files\SumatraPDF-3.1.2-64-install.exe" /S
Msiexec /q /I "%WINDIR%\Setup\Files\7z1801-x64.msi"
Msiexec /q /I "%WINDIR%\Setup\Files\GoogleChromeStandaloneEnterprise64.msi"
Msiexec /q /I "%WINDIR%\Setup\Files\LibreOffice_5.4.6_Win_x64.msi"
rem "%WINDIR%\Setup\Files\avira_pc_cleaner_en.exe" /s
"%WINDIR%\Setup\Files\mb3-setup-consumer-3.4.5.2467-1.0.342-1.0.4664.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
"%WINDIR%\Setup\Files\avast_business_antivirus_managed_setup_offline_silent.exe"

mkdir "%Public%\Desktop.dennyhalim"
move "%Public%\Desktop\*.*" "%Public%\Desktop.dennyhalim"
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '%WINDIR%\Setup\Files\setup.ps1'"

rem "%WINDIR%\Setup-githubbox.exe"
rem rd /q /s "%WINDIR%\Setup\Files"
rem del /q /f "%0"

Update SetupComplete.cmd

Update SetupComplete.cmd


SETLOCAL

> wget.vbs (
echo.url = WScript.Arguments.Named^("url"^)
echo.path = WScript.Arguments.Named^("path"^)
echo.proxy = null
echo.Set objXMLHTTP = CreateObject^("MSXML2.ServerXMLHTTP"^)
echo.Set wshShell = CreateObject^( "WScript.Shell" ^)
echo.Set objUserVariables = wshShell.Environment^("USER"^)
echo.
echo.'http proxy is optional
echo.'attempt to read from HTTP_PROXY env var first
echo.On Error Resume Next
echo.
echo.If NOT ^(objUserVariables^("HTTP_PROXY"^) = ""^) Then
echo.proxy = objUserVariables^("HTTP_PROXY"^)
echo.
echo.'fall back to named arg
echo.ElseIf NOT ^(WScript.Arguments.Named^("proxy"^) = ""^) Then
echo.proxy = WScript.Arguments.Named^("proxy"^)
echo.End If
echo.
echo.If NOT isNull^(proxy^) Then
echo.'setProxy method is only available on ServerXMLHTTP 6.0+
echo.Set objXMLHTTP = CreateObject^("MSXML2.ServerXMLHTTP.6.0"^)
echo.objXMLHTTP.setProxy 2, proxy
echo.End If
echo.
echo.On Error Goto 0
echo.
echo.objXMLHTTP.open "GET", url, false
echo.objXMLHTTP.send^(^)
echo.If objXMLHTTP.Status = 200 Then
echo.Set objADOStream = CreateObject^("ADODB.Stream"^)
echo.objADOStream.Open
echo.objADOStream.Type = 1
echo.objADOStream.Write objXMLHTTP.ResponseBody
echo.objADOStream.Position = 0
echo.Set objFSO = Createobject^("Scripting.FileSystemObject"^)
echo.If objFSO.Fileexists^(path^) Then objFSO.DeleteFile path
echo.Set objFSO = Nothing
echo.objADOStream.SaveToFile path
echo.objADOStream.Close
echo.Set objADOStream = Nothing
echo.End if
echo.Set objXMLHTTP = Nothing
)

rem # remove the chef package / clobber the files
rmdir /S /Q C:\opscode

rem # remove the old installer, if it exists, ignore errors
del /F /Q %TMP%\install.msi

rem # download the new chef installer
rem # right now we have one build, fake the platform resulution crap
cscript /nologo wget.vbs /url:"http://%OMNITRUCK_BASE_URL%/chef/download?p=windows&pv=2008r2&m=x86_64&v=%INSTALL_CHEF_VERSION%" /path:%TMP%\install.msi

rem # XXX: uninstall any left over version, ignore errors
call call msiexec /qb /x %TMP%\install.msi

call msiexec INSTALLLOCATION=C:\opscode /qb /i %TMP%\install.msi || GOTO :error

call C:\opscode\chef\bin\chef-client --version || GOTO :error

call call msiexec /qb /x %TMP%\install.msi || GOTO :error

GOTO :EOF

:error

SET ERR_LEV=%errorlevel%

ECHO Failed with error level %ERR_LEV%

call call msiexec /qb /x %TMP%\install.msi

EXIT /B %ERR_LEV%

ENDLOCAL

SETLOCAL

> wget.vbs (
echo.url = WScript.Arguments.Named^("url"^)
echo.path = WScript.Arguments.Named^("path"^)
echo.proxy = null
echo.Set objXMLHTTP = CreateObject^("MSXML2.ServerXMLHTTP"^)
echo.Set wshShell = CreateObject^( "WScript.Shell" ^)
echo.Set objUserVariables = wshShell.Environment^("USER"^)
echo.
echo.'http proxy is optional
echo.'attempt to read from HTTP_PROXY env var first
echo.On Error Resume Next
echo.
echo.If NOT ^(objUserVariables^("HTTP_PROXY"^) = ""^) Then
echo.proxy = objUserVariables^("HTTP_PROXY"^)
echo.
echo.'fall back to named arg
echo.ElseIf NOT ^(WScript.Arguments.Named^("proxy"^) = ""^) Then
echo.proxy = WScript.Arguments.Named^("proxy"^)
echo.End If
echo.
echo.If NOT isNull^(proxy^) Then
echo.'setProxy method is only available on ServerXMLHTTP 6.0+
echo.Set objXMLHTTP = CreateObject^("MSXML2.ServerXMLHTTP.6.0"^)
echo.objXMLHTTP.setProxy 2, proxy
echo.End If
echo.
echo.On Error Goto 0
echo.
echo.objXMLHTTP.open "GET", url, false
echo.objXMLHTTP.send^(^)
echo.If objXMLHTTP.Status = 200 Then
echo.Set objADOStream = CreateObject^("ADODB.Stream"^)
echo.objADOStream.Open
echo.objADOStream.Type = 1
echo.objADOStream.Write objXMLHTTP.ResponseBody
echo.objADOStream.Position = 0
echo.Set objFSO = Createobject^("Scripting.FileSystemObject"^)
echo.If objFSO.Fileexists^(path^) Then objFSO.DeleteFile path
echo.Set objFSO = Nothing
echo.objADOStream.SaveToFile path
echo.objADOStream.Close
echo.Set objADOStream = Nothing
echo.End if
echo.Set objXMLHTTP = Nothing
)

rem # XXX: uninstall any left over version, ignore errors
call msiexec /qb /x %TMP%\install.msi

rem # remove the chef package / clobber the files
rmdir /S /Q C:\opscode

rem # remove the old installer, if it exists, ignore errors
del /F /Q %TMP%\install.msi

rem # download the new chef installer
rem # right now we have one build, fake the platform resulution crap
cscript /nologo wget.vbs /url:"http://%OMNITRUCK_BASE_URL%/chef/download?p=windows&pv=2008r2&m=x86_64&v=%INSTALL_CHEF_VERSION%" /path:%TMP%\install.msi

call msiexec INSTALLLOCATION=C:\opscode /qb /i %TMP%\install.msi || GOTO :error

call C:\opscode\chef\bin\chef-client --version || GOTO :error

call msiexec /qb /x %TMP%\install.msi || GOTO :error

GOTO :EOF

:error

SET ERR_LEV=%errorlevel%

ECHO Failed with error level %ERR_LEV%

call msiexec /qb /x %TMP%\install.msi

EXIT /B %ERR_LEV%

ENDLOCAL

move uninstall earlier

move uninstall earlier


@echo off
SETLOCAL EnableDelayedExpansion
REM ingress-ice start script by Nikitakun
REM (http://github.com/nibogd/ingress-ice)
REM Double-click this file and follow the
REM instructions

set FILE="%APPDATA%\.ingress-ice.conf"
IF '%1'=='/?' GOTO :help
IF '%1'=='-h' GOTO :help
IF '%1'=='-r' GOTO :config
GOTO :check
:check
IF EXIST %FILE% (
	GOTO :start
) else (
        cp ingress-ice.conf.sample %FILE%
	GOTO :config
)
:config
cls
echo Ingress ICE, Automatic screenshooter for ingress intel map
echo.
echo I've created a blank configuration file for you.
echo Notepad will be opened now. Insert your settings, save the file and close the notepad. Ice will start automatically
echo.
echo You can edit your configuration any time, just start 'reconfigure.cmd'
echo.
notepad %FILE%
PAUSE
:start
cls
echo Existing config file found (%FILE%). Starting ice...
set /p ARGS=%FILE%
phantomjs.exe ice.js !ARGS!
pause
goto :eof
:help
echo Ingress ICE, an automated screenshooter for ingress intel map
echo Copyright (c) Nikitakun (github.com/nibogd)
echo.
echo Usage:
echo   ingress-ice.cmd [-r] [-h]
echo.
echo Options:
echo   -r      Edit the configuration
echo   -h      Print this help
echo.
echo Please visit http://ingress.divshot.io/ or http://github.com/nibgd/ingress-ice for additional help
:eof

@echo off
SETLOCAL EnableDelayedExpansion
REM ingress-ice start script by Nikitakun
REM (http://github.com/nibogd/ingress-ice)
REM Double-click this file and follow the
REM instructions

set FILE="%APPDATA%\.ingress-ice.conf"
IF '%1'=='/?' GOTO :help
IF '%1'=='-h' GOTO :help
IF '%1'=='-r' GOTO :config
GOTO :check
:check
IF EXIST %FILE% (
	GOTO :start
) else (
        copy ingress-ice.conf.sample %FILE%
	GOTO :config
)
:config
cls
echo Ingress ICE, Automatic screenshooter for ingress intel map
echo.
echo I've created a blank configuration file for you.
echo Notepad will be opened now. Insert your settings, save the file and close the notepad. Ice will start automatically
echo.
echo You can edit your configuration any time, just start 'reconfigure.cmd'
echo.
notepad %FILE%
PAUSE
:start
cls
echo Existing config file found (%FILE%). Starting ice...
set /p ARGS=%FILE%
phantomjs.exe ice.js !ARGS!
pause
goto :eof
:help
echo Ingress ICE, an automated screenshooter for ingress intel map
echo Copyright (c) Nikitakun (github.com/nibogd)
echo.
echo Usage:
echo   ingress-ice.cmd [-r] [-h]
echo.
echo Options:
echo   -r      Edit the configuration
echo   -h      Print this help
echo.
echo Please visit http://ingress.divshot.io/ or http://github.com/nibgd/ingress-ice for additional help
:eof

Fix for windows

Fix for windows


@echo off

rem   Licensed to the Apache Software Foundation (ASF) under one or more
rem   contributor license agreements.  See the NOTICE file distributed with
rem   this work for additional information regarding copyright ownership.
rem   The ASF licenses this file to You under the Apache License, Version 2.0
rem   (the "License"); you may not use this file except in compliance with
rem   the License.  You may obtain a copy of the License at
rem
rem       http://www.apache.org/licenses/LICENSE-2.0
rem
rem   Unless required by applicable law or agreed to in writing, software
rem   distributed under the License is distributed on an "AS IS" BASIS,
rem   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem   See the License for the specific language governing permissions and
rem   limitations under the License.

rem   =====================================================
rem   Environment variables that can be defined externally:
rem
rem   JMETER_BIN - JMeter bin directory (must end in \)
rem   JM_LAUNCH - java.exe (default) or javaw.exe
rem   JVM_ARGS - additional java options, e.g. -Dprop=val
rem   JM_START - set this to "start" to launch JMeter in a separate window
rem              this is used by the jmeterw.cmd script.
rem
rem   =====================================================

setlocal

rem Minimal version to run JMeter
set MINIMAL_VERSION=1.8.0

for /f "tokens=3" %%g in ('java -version 2^>^&1 ^| findstr /i "version"') do (
    rem @echo Debug Output: %%g
    set JAVAVER=%%g
)
if not defined JAVAVER (
    @echo Not able to find Java executable or version. Please check your Java installation.
    set ERRORLEVEL=2
    goto pause
)
set JAVAVER=%JAVAVER:"=%
for /f "delims=. tokens=1-3" %%v in ("%JAVAVER%") do (
    set current_minor=%%w
)

for /f "delims=. tokens=1-3" %%v in ("%MINIMAL_VERSION%") do (
    set minimal_minor=%%w
)

if not defined current_minor (
    @echo Not able to find Java executable or version. Please check your Java installation.
    set ERRORLEVEL=2
    goto pause
)
rem @echo Debug: CURRENT=%current_minor% - MINIMAL=%minimal_minor%
if %current_minor% LSS %minimal_minor% (
    @echo Error: Java version -- %JAVAVER% -- is too low to run JMeter. Needs a Java version greater than or equal to %MINIMAL_VERSION%
    set ERRORLEVEL=3
    goto pause
)

if .%JM_LAUNCH% == . set JM_LAUNCH=java.exe

if exist jmeter.bat goto winNT1
if .%JMETER_BIN% == . set JMETER_BIN=%~dp0

:winNT1
rem On NT/2K grab all arguments at once
set JMETER_CMD_LINE_ARGS=%*

rem The following link describes the -XX options:
rem http://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html

rem See the unix startup file for the rationale of the following parameters,
rem including some tuning recommendations
set HEAP=-Xms512m -Xmx512m

#Uncomment this to generate GC verbose file
rem set VERBOSE_GC=-verbose:gc -Xloggc:gc_jmeter_%p.log -XX:+PrintGCDetails -XX:+PrintGCCause -XX:+PrintTenuringDistribution -XX:+PrintHeapAtGC -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDateStamps

set GC_ALGO=-XX:+UseG1GC -XX:MaxGCPauseMillis=250 -XX:G1ReservePercent=20

set SYSTEM_PROPS=-Djava.security.egd=file:/dev/urandom
rem Always dump on OOM (does not cost anything unless triggered)
set DUMP=-XX:+HeapDumpOnOutOfMemoryError

rem Additional settings that might help improve GUI performance on some platforms
rem See: http://www.oracle.com/technetwork/java/perf-graphics-135933.html

set DDRAW=
rem  Setting this flag to true turns off DirectDraw usage, which sometimes helps to get rid of a lot of rendering problems on Win32.
rem set DDRAW=%DDRAW% -Dsun.java2d.noddraw=true

rem  Setting this flag to false turns off DirectDraw offscreen surfaces acceleration by forcing all createVolatileImage calls to become createImage calls, and disables hidden acceleration performed on surfaces created with createImage .
rem set DDRAW=%DDRAW% -Dsun.java2d.ddoffscreen=false

rem Setting this flag to true enables hardware-accelerated scaling.
rem set DDRAW=%DDRAW% -Dsun.java2d.ddscale=true

rem Server mode
rem Collect the settings defined above
set ARGS=%DUMP% %HEAP% %VERBOSE_GC% %GC_ALGO% %DDRAW% %SYSTEM_PROPS%

%JM_START% %JM_LAUNCH% %ARGS% %JVM_ARGS% -jar "%JMETER_BIN%ApacheJMeter.jar" %JMETER_CMD_LINE_ARGS%

rem If the errorlevel is not zero, then display it and pause

if NOT errorlevel 0 goto pause
if errorlevel 1 goto pause

goto end

:pause
echo errorlevel=%ERRORLEVEL%
pause

:end

@echo off

rem   Licensed to the Apache Software Foundation (ASF) under one or more
rem   contributor license agreements.  See the NOTICE file distributed with
rem   this work for additional information regarding copyright ownership.
rem   The ASF licenses this file to You under the Apache License, Version 2.0
rem   (the "License"); you may not use this file except in compliance with
rem   the License.  You may obtain a copy of the License at
rem
rem       http://www.apache.org/licenses/LICENSE-2.0
rem
rem   Unless required by applicable law or agreed to in writing, software
rem   distributed under the License is distributed on an "AS IS" BASIS,
rem   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem   See the License for the specific language governing permissions and
rem   limitations under the License.

rem   =====================================================
rem   Environment variables that can be defined externally:
rem
rem   JMETER_BIN - JMeter bin directory (must end in \)
rem   JM_LAUNCH - java.exe (default) or javaw.exe
rem   JVM_ARGS - additional java options, e.g. -Dprop=val
rem   JM_START - set this to "start" to launch JMeter in a separate window
rem              this is used by the jmeterw.cmd script.
rem
rem   =====================================================

setlocal

rem Minimal version to run JMeter
set MINIMAL_VERSION=1.8.0

for /f "tokens=3" %%g in ('java -version 2^>^&1 ^| findstr /i "version"') do (
    rem @echo Debug Output: %%g
    set JAVAVER=%%g
)
if not defined JAVAVER (
    @echo Not able to find Java executable or version. Please check your Java installation.
    set ERRORLEVEL=2
    goto pause
)
set JAVAVER=%JAVAVER:"=%
for /f "delims=. tokens=1-3" %%v in ("%JAVAVER%") do (
    set current_minor=%%w
)

for /f "delims=. tokens=1-3" %%v in ("%MINIMAL_VERSION%") do (
    set minimal_minor=%%w
)

if not defined current_minor (
    @echo Not able to find Java executable or version. Please check your Java installation.
    set ERRORLEVEL=2
    goto pause
)
rem @echo Debug: CURRENT=%current_minor% - MINIMAL=%minimal_minor%
if %current_minor% LSS %minimal_minor% (
    @echo Error: Java version -- %JAVAVER% -- is too low to run JMeter. Needs a Java version greater than or equal to %MINIMAL_VERSION%
    set ERRORLEVEL=3
    goto pause
)

if .%JM_LAUNCH% == . set JM_LAUNCH=java.exe

if exist jmeter.bat goto winNT1
if .%JMETER_BIN% == . set JMETER_BIN=%~dp0

:winNT1
rem On NT/2K grab all arguments at once
set JMETER_CMD_LINE_ARGS=%*

rem The following link describes the -XX options:
rem http://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html

rem See the unix startup file for the rationale of the following parameters,
rem including some tuning recommendations
set HEAP=-Xms512m -Xmx512m

rem Uncomment this to generate GC verbose file
rem set VERBOSE_GC=-verbose:gc -Xloggc:gc_jmeter_%p.log -XX:+PrintGCDetails -XX:+PrintGCCause -XX:+PrintTenuringDistribution -XX:+PrintHeapAtGC -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDateStamps

set GC_ALGO=-XX:+UseG1GC -XX:MaxGCPauseMillis=250 -XX:G1ReservePercent=20

set SYSTEM_PROPS=-Djava.security.egd=file:/dev/urandom
rem Always dump on OOM (does not cost anything unless triggered)
set DUMP=-XX:+HeapDumpOnOutOfMemoryError

rem Additional settings that might help improve GUI performance on some platforms
rem See: http://www.oracle.com/technetwork/java/perf-graphics-135933.html

set DDRAW=
rem  Setting this flag to true turns off DirectDraw usage, which sometimes helps to get rid of a lot of rendering problems on Win32.
rem set DDRAW=%DDRAW% -Dsun.java2d.noddraw=true

rem  Setting this flag to false turns off DirectDraw offscreen surfaces acceleration by forcing all createVolatileImage calls to become createImage calls, and disables hidden acceleration performed on surfaces created with createImage .
rem set DDRAW=%DDRAW% -Dsun.java2d.ddoffscreen=false

rem Setting this flag to true enables hardware-accelerated scaling.
rem set DDRAW=%DDRAW% -Dsun.java2d.ddscale=true

rem Server mode
rem Collect the settings defined above
set ARGS=%DUMP% %HEAP% %VERBOSE_GC% %GC_ALGO% %DDRAW% %SYSTEM_PROPS% %JM_START% %JM_LAUNCH% %ARGS% %JVM_ARGS% -jar "%JMETER_BIN%ApacheJMeter.jar" %JMETER_CMD_LINE_ARGS%

rem If the errorlevel is not zero, then display it and pause

if NOT errorlevel 0 goto pause
if errorlevel 1 goto pause

goto end

:pause
echo errorlevel=%ERRORLEVEL%
pause

:end

Fix typos in jmeter.bat

Fix typos in jmeter.bat

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1780118 13f79535-47bb-0310-9956-ffa450edef68

Former-commit-id: a5d623862a639418e41fe379d4cbd67803177164


:: USAGE:
::     which [-a] [--] name [...]
::
:: -a  Print all available matchings accordingly the description below.
::
:: For each of the names the script looks for and displays a doskey macro,
:: the internal command information or the full path to the executable
:: file in this order. The script doesn't mimic of the Unix command having
:: the same name. It assumes specifics of the Windows command prompt.
::
:: First of all, it looks for doskey macros because they have the higher
:: priority in the prompt. The next step is a looking for internal
:: commands from the known list of the commands. If the command is
:: identified as internal the searching is stopped.
::
:: If nothing has been found previously, the script continues searching of
:: external commands in the current directory and the directories from the
:: PATH environment. If no extension is specified, the PATHEXT variable is
:: used for attempts to find the nearest filename corresponding the
:: provided name.
::
:: ENVIRONMENT:
::     PATH, PATHEXT
::
:: SEE ALSO:
::     DOSKEY /?
::     HELP /?
::     http://ss64.com/nt/
::
:: COPYRIGHTS
:: Copyright (c) 2010, 2014 Ildar Shaimordanov

@echo off

if "%~1" == "" (
	for %%p in ( powershell.exe ) do if not "%%~$PATH:p" == "" (
		"%%~$PATH:p" -NoProfile -NoLogo -Command "cat '%~f0' | where { $_ -match '^::' } | %% { $_ -replace '::', '' }"
		goto :EOF
	)
	for /f "usebackq tokens=* delims=:" %%s in ( "%~f0" ) do (
		if /i "%%s" == "@echo off" goto :EOF
		echo:%%s
	)
	goto :EOF
)

setlocal

set "which_all="

:which_opt_begin
set "which_opt=%~1"
if not defined which_opt goto :which_opt_end
if not "%which_opt:~0,1%" == "-" goto :which_opt_end
if "%~1" == "--" goto :which_opt_end

if /i "%~1" == "-a" set which_all=1
shift

goto :which_opt_begin
:which_opt_end

:which_arg_begin
if "%~1" == "" goto :which_arg_end

echo:%~1 | "%windir%\system32\findstr.exe" /v ": \ * ? ; /" >nul || (
	echo:%~n0: Name should not consist of drive, paths or wildcards>&2
	goto :which_arg_continue
)

for /f "tokens=1,* delims==" %%a in ( '
	"%windir%\System32\doskey.exe" /MACROS
' ) do if /i "%~1" == "%%a" (
	echo:%%a=%%b
	if not defined which_all goto :which_arg_continue
)

for %%b in (
	ASSOC CALL CD CHDIR CLS COLOR COPY DATE DEL DIR ECHO
	ENDLOCAL ERASE EXIT FOR FTYPE GOTO IF MD MKDIR MKLINK MOVE
	PATH PAUSE POPD PROMPT PUSHD RD REM REN RENAME RMDIR SET
	SETLOCAL SHIFT START TIME TITLE TYPE VER VERIFY VOL
) do if /i "%~1" == "%%~b" (
	echo:"%~1" is internal
	goto :which_arg_continue
)

set "which_ext="
for %%x in ( "%PATHEXT:;=" "%" ) do if /i "%~x1" == "%%~x" set "which_ext=%%~x"

if defined which_ext (
	call :which_binary_here "%~1" && if not defined which_all goto :which_arg_continue
	call :which_binary_path "%~1" && if not defined which_all goto :which_arg_continue
)

for %%x in ( "%PATHEXT:;=" "%" ) do (
	call :which_binary_here "%~1%%~x" && if not defined which_all goto :which_arg_continue
)
for %%x in ( "%PATHEXT:;=" "%" ) do (
	call :which_binary_path "%~1%%~x" && if not defined which_all goto :which_arg_continue
)

:which_arg_continue

shift

goto :which_arg_begin
:which_arg_end

endlocal
goto :EOF

:which_binary_here
if not exist ".\%~1" exit /b 1
echo:.\%~1
exit /b 0

:which_binary_path
for %%p in ( "%PATH:;=" "%" ) do for %%q in ( "%%~fp" ) do if exist "%%~fq\%~1" (
	echo:%%~fq\%~1
	if not defined which_all exit /b 0
)
exit /b 1

rem EOF

:: USAGE:
::     which [-a] [--] name [...]
::
:: -a  Print all available matchings accordingly the description below.
::
:: For each of the names the script looks for and displays a doskey macro,
:: the internal command information or the full path to the executable
:: file in this order. The script doesn't mimic of the Unix command having
:: the same name. It assumes specifics of the Windows command prompt.
::
:: First of all, it looks for doskey macros because they have the higher
:: priority in the prompt. The next step is a looking for internal
:: commands from the known list of the commands. If the command is
:: identified as internal the searching is stopped.
::
:: If nothing has been found previously, the script continues searching of
:: external commands in the current directory and the directories from the
:: PATH environment. If no extension is specified, the PATHEXT variable is
:: used for attempts to find the nearest filename corresponding the
:: provided name.
::
:: ENVIRONMENT:
::     PATH, PATHEXT
::
:: SEE ALSO:
::     DOSKEY /?
::     HELP /?
::     http://ss64.com/nt/
::
:: COPYRIGHTS
:: Copyright (c) 2010, 2014 Ildar Shaimordanov

@echo off

if "%~1" == "" (
	for %%p in ( powershell.exe ) do if not "%%~$PATH:p" == "" (
		"%%~$PATH:p" -NoProfile -NoLogo -Command "cat '%~f0' | where { $_ -match '^::' } | %% { $_ -replace '::', '' }"
		goto :EOF
	)
	for /f "usebackq tokens=* delims=:" %%s in ( "%~f0" ) do (
		if /i "%%s" == "@echo off" goto :EOF
		echo:%%s
	)
	goto :EOF
)

setlocal

set "which_all="

:which_opt_begin
set "which_opt=%~1"
if not defined which_opt goto :which_opt_end
if not "%which_opt:~0,1%" == "-" goto :which_opt_end
if "%~1" == "--" goto :which_opt_end

if /i "%~1" == "-a" set which_all=1
shift

goto :which_opt_begin
:which_opt_end

:which_arg_begin
if "%~1" == "" goto :which_arg_end

echo:%~1 | "%windir%\system32\findstr.exe" /v ": \ * ? ; /" >nul || (
	echo:%~n0: Name should not consist of drive, paths or wildcards>&2
	goto :which_arg_continue
)

for /f "tokens=1,* delims==" %%a in ( '
	"%windir%\System32\doskey.exe" /MACROS
' ) do if /i "%~1" == "%%a" (
	echo:%%a=%%b
	if not defined which_all goto :which_arg_continue
)

for %%b in (
	ASSOC CALL CD CHDIR CLS COLOR COPY DATE DEL DIR ECHO
	ENDLOCAL ERASE EXIT FOR FTYPE GOTO IF MD MKDIR MKLINK MOVE
	PATH PAUSE POPD PROMPT PUSHD RD REM REN RENAME RMDIR SET
	SETLOCAL SHIFT START TIME TITLE TYPE VER VERIFY VOL
) do if /i "%~1" == "%%~b" (
	echo:"%~1" is internal
	if not defined which_all goto :which_arg_continue
)

set "which_ext="
for %%x in ( "%PATHEXT:;=" "%" ) do if /i "%~x1" == "%%~x" set "which_ext=%%~x"

if defined which_ext (
	call :which_binary_here "%~1" && if not defined which_all goto :which_arg_continue
	call :which_binary_path "%~1" && if not defined which_all goto :which_arg_continue
)

for %%x in ( "%PATHEXT:;=" "%" ) do (
	call :which_binary_here "%~1%%~x" && if not defined which_all goto :which_arg_continue
)
for %%x in ( "%PATHEXT:;=" "%" ) do (
	call :which_binary_path "%~1%%~x" && if not defined which_all goto :which_arg_continue
)

:which_arg_continue

shift

goto :which_arg_begin
:which_arg_end

endlocal
goto :EOF

:which_binary_here
if not exist ".\%~1" exit /b 1
echo:.\%~1
exit /b 0

:which_binary_path
for %%p in ( "%PATH:;=" "%" ) do for %%q in ( "%%~fp" ) do if exist "%%~fq\%~1" (
	echo:%%~fq\%~1
	if not defined which_all exit /b 0
)
exit /b 1

rem EOF

fix issue with "which -a" command

fix issue with "which -a" command


@echo off
NuGet.exe install MSBuildTasks -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive
NuGet.exe install xunit.runners -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive

@echo off
Nuget.exe restore "Source\FluentHtml.sln"

NuGet.exe install MSBuildTasks -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive
NuGet.exe install xunit.runners -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive

update bootstrap.cmd

update bootstrap.cmd


rem dennyhalim.com
rem this will be copied after first reboot and then run after next reboot

rem replace defaultlayouts before it gets created
move "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.dennyhalim"
copy /y "%WINDIR%\Setup\Files\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml"
move "%SystemRoot%\SysWOW64\OneDriveSetup.exe" "%SystemRoot%\SysWOW64\OneDriveSetup.dennyhalim"
move "%SystemRoot%\System32\OneDriveSetup.exe" "%SystemRoot%\System32\OneDriveSetup.dennyhalim"
rem move "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy" "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy.dennyhalim"
rem startmenu disabled if shellex disabled
rem move "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy" "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy.dennyhalim"

wmic.exe USERACCOUNT WHERE "Name='admin'" set PasswordExpires=FALSE
wmic.exe USERACCOUNT WHERE "Name='user'" set PasswordExpires=FALSE

reg.exe load "HKLM\DEFAULT" "%Public%\..\default\ntuser.dat"
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" /v PeopleBand /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackProgs /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Input\TIPC" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" /v GlobalUserDisabled /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v Value /d Deny /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v epicsetup /t REG_SZ /D "%WINDIR%\Setup\Files\mini_installer.exe" /F
reg.exe delete "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /F
reg.exe unload "HKLM\DEFAULT"

reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v DisableWindowsConsumerFeatures /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v LetAppsRunInBackground /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferUpgrade /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v BranchReadinessLevel /t REG_DWORD /d 32 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdates /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdatesPeriodinDays /t REG_DWORD /d 365 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v AllowCortana /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseCredShared /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseOpen /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" /v 1 /t REG_SZ /d pool.ntp.org /f
reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\sppsvc" /v Start /t REG_DWORD /d 4 /f
reg.exe add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 1 /f
reg.exe add "HKLM\Software\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm" /v update_url /t REG_SZ /D "https://clients2.google.com/service/update2/crx" /F
reg.exe add "HKLM\Software\Wow6432Node\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm" /v update_url /t REG_SZ /D "https://clients2.google.com/service/update2/crx" /F
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DefaultCookiesSetting /f /t REG_DWORD /d 4
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DefaultNotificationsSetting /f /t REG_DWORD /d 2
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DefaultGeolocationSetting /f /t REG_DWORD /d 2
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v HomepageLocation /f /t REG_SZ /d "http://dennyhalim.com"
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v BackgroundModeEnabled /f /t REG_DWORD /d 0
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v BlockThirdPartyCookies /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v BuiltInDnsClientEnabled /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DiskCacheSize /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v ForceGoogleSafeSearch /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v ForceYouTubeRestrict /f /t REG_DWORD /d 1

cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon LBP2900" -i "%WINDIR%\Setup\Drivers\CanonLBP2900\CNAB4STD.inf"
cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon G2000 series Printer" -i "%WINDIR%\Setup\Drivers\CanonG2000\Driver\G2000P6.inf"
rem move "%WINDIR%\Setup\Drivers\*" "%WINDIR%\INF"

schtasks.exe /change /TN "\Microsoft\Windows\Setup\SetupCleanupTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\ProgramDataUpdater" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /DISABLE

"%WINDIR%\Setup\Files\chocolatey.exe" /S
"%WINDIR%\Setup\Files\Firefox Setup 52.6.0esr.exe" -ms
"%WINDIR%\Setup\Files\vlc-3.0.1-win64.exe" /L=1033 /S
"%WINDIR%\Setup\Files\SumatraPDF-3.1.2-64-install.exe" /S
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\just-install.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\NpackdCL-1.23.2.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\7z1805-x64.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\qalculate-2.4.0a.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\GoogleChromeStandaloneEnterprise64.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\LibreOffice_5.4.6_Win_x64.msi"
rem "%WINDIR%\Setup\Files\avira_pc_cleaner_en.exe" /s
"%WINDIR%\Setup\Files\mb3-setup-consumer-3.4.5.2467-1.0.342-1.0.4664.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
"%WINDIR%\Setup\Files\avast_business_antivirus_managed_setup_offline_silent.exe"

powershell.exe -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Progs\OpenSSH\install-sshd.ps1"
PowerShell.exe -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Files\setup.ps1"

sc.exe config wuauserv start= demand
sc.exe config DiagTrack start= disabled
sc.exe config dmwappushservice start= disabled
sc.exe config RetailDemo start= disabled
sc.exe config lfsvc start= disabled
sc.exe config ssh-agent start= auto
sc.exe config sshd start= auto

netsh advfirewall firewall add rule dir=in action=allow profile=any protocol=TCP localport=2222 name="sshd"

mkdir "%Public%\Desktop.dennyhalim"
move "%Public%\Desktop\*.*" "%Public%\Desktop.dennyhalim"

rem use powershell for w10 only features
dism.exe /online /norestart /Enable-Feature /FeatureName:TelnetClient
dism.exe /online /norestart /Disable-Feature /FeatureName:MediaPlayback
dism.exe /online /norestart /Disable-Feature /FeatureName:WindowsMediaPlayer
dism.exe /online /norestart /Disable-Feature /FeatureName:WindowsGadgetPlatform
dism.exe /online /norestart /Disable-Feature /FeatureName:Indexing-Service-Package
dism.exe /online /norestart /Disable-Feature /FeatureName:Internet-Explorer-Optional-x86
dism.exe /online /norestart /Disable-Feature /FeatureName:Internet-Explorer-Optional-amd64

powercfg -hibernate on
REAGENTC.EXE /enable
rem "%WINDIR%\Setup-githubbox.exe"
rem shutdown /r /f /t 0

rem dennyhalim.com
rem this will be copied after first reboot and then run after next reboot

rem replace defaultlayouts before it gets created
move "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.dennyhalim"
copy /y "%WINDIR%\Setup\Files\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml"
move "%SystemRoot%\SysWOW64\OneDriveSetup.exe" "%SystemRoot%\SysWOW64\OneDriveSetup.dennyhalim"
move "%SystemRoot%\System32\OneDriveSetup.exe" "%SystemRoot%\System32\OneDriveSetup.dennyhalim"
rem move "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy" "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy.dennyhalim"
rem startmenu disabled if shellex disabled
rem move "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy" "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy.dennyhalim"

wmic.exe USERACCOUNT WHERE "Name='admin'" set PasswordExpires=FALSE
wmic.exe USERACCOUNT WHERE "Name='user'" set PasswordExpires=FALSE

reg.exe load "HKLM\DEFAULT" "%Public%\..\default\ntuser.dat"
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" /v PeopleBand /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackProgs /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Input\TIPC" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" /v GlobalUserDisabled /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v Value /d Deny /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v epicsetup /t REG_SZ /D "%WINDIR%\Setup\Files\mini_installer.exe" /F
reg.exe delete "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /F
reg.exe unload "HKLM\DEFAULT"

reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v DisableWindowsConsumerFeatures /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v LetAppsRunInBackground /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferUpgrade /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v BranchReadinessLevel /t REG_DWORD /d 32 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdates /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdatesPeriodinDays /t REG_DWORD /d 365 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v AllowCortana /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseCredShared /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseOpen /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" /v 1 /t REG_SZ /d pool.ntp.org /f
reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\sppsvc" /v Start /t REG_DWORD /d 4 /f
reg.exe add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 1 /f
reg.exe add "HKLM\Software\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm" /v update_url /t REG_SZ /D "https://clients2.google.com/service/update2/crx" /F
reg.exe add "HKLM\Software\Wow6432Node\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm" /v update_url /t REG_SZ /D "https://clients2.google.com/service/update2/crx" /F
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v BackgroundModeEnabled /f /t REG_DWORD /d 0
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DefaultCookiesSetting /f /t REG_DWORD /d 4
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DefaultNotificationsSetting /f /t REG_DWORD /d 2
rem reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DefaultGeolocationSetting /f /t REG_DWORD /d 2
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v HomepageLocation /f /t REG_SZ /d "http://dennyhalim.com"
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v BlockThirdPartyCookies /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v BuiltInDnsClientEnabled /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DiskCacheSize /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v ForceGoogleSafeSearch /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v ForceYouTubeRestrict /f /t REG_DWORD /d 1

cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon LBP2900" -i "%WINDIR%\Setup\Drivers\CanonLBP2900\CNAB4STD.inf"
cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon G2000 series Printer" -i "%WINDIR%\Setup\Drivers\CanonG2000\Driver\G2000P6.inf"
rem move "%WINDIR%\Setup\Drivers\*" "%WINDIR%\INF"

schtasks.exe /change /TN "\Microsoft\Windows\Setup\SetupCleanupTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\ProgramDataUpdater" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /DISABLE

"%WINDIR%\Setup\Files\chocolatey.exe" /S
"%WINDIR%\Setup\Files\Firefox Setup 52.6.0esr.exe" -ms
"%WINDIR%\Setup\Files\vlc-3.0.1-win64.exe" /L=1033 /S
"%WINDIR%\Setup\Files\SumatraPDF-3.1.2-64-install.exe" /S
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\just-install.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\NpackdCL-1.23.2.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\7z1805-x64.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\qalculate-2.4.0a.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\GoogleChromeStandaloneEnterprise64.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\LibreOffice_5.4.6_Win_x64.msi"
rem "%WINDIR%\Setup\Files\avira_pc_cleaner_en.exe" /s
"%WINDIR%\Setup\Files\mb3-setup-consumer-3.4.5.2467-1.0.342-1.0.4664.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
"%WINDIR%\Setup\Files\avast_business_antivirus_managed_setup_offline_silent.exe"

powershell.exe -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Progs\OpenSSH\install-sshd.ps1"
PowerShell.exe -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Files\setup.ps1"

sc.exe config wuauserv start= demand
sc.exe config DiagTrack start= disabled
sc.exe config dmwappushservice start= disabled
sc.exe config RetailDemo start= disabled
sc.exe config lfsvc start= disabled
sc.exe config ssh-agent start= auto
sc.exe config sshd start= auto

netsh advfirewall firewall add rule dir=in action=allow profile=any protocol=TCP localport=2222 name="sshd"

mkdir "%Public%\Desktop.dennyhalim"
move "%Public%\Desktop\*.*" "%Public%\Desktop.dennyhalim"

rem use powershell for w10 only features
dism.exe /online /norestart /Enable-Feature /FeatureName:TelnetClient
dism.exe /online /norestart /Disable-Feature /FeatureName:MediaPlayback
dism.exe /online /norestart /Disable-Feature /FeatureName:WindowsMediaPlayer
dism.exe /online /norestart /Disable-Feature /FeatureName:WindowsGadgetPlatform
dism.exe /online /norestart /Disable-Feature /FeatureName:Indexing-Service-Package
dism.exe /online /norestart /Disable-Feature /FeatureName:Internet-Explorer-Optional-x86
dism.exe /online /norestart /Disable-Feature /FeatureName:Internet-Explorer-Optional-amd64

powercfg -hibernate on
REAGENTC.EXE /enable
rem "%WINDIR%\Setup-githubbox.exe"
rem shutdown /r /f /t 0

Update SetupComplete.cmd

Update SetupComplete.cmd


rem dennyhalim.com
rem this will be copied after first reboot and then run after next reboot

rem replace defaultlayouts before it gets created
move "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.dennyhalim"
copy /y "%WINDIR%\Setup\Files\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml"
move "%SystemRoot%\SysWOW64\OneDriveSetup.exe" "%SystemRoot%\SysWOW64\OneDriveSetup.dennyhalim"
move "%SystemRoot%\System32\OneDriveSetup.exe" "%SystemRoot%\System32\OneDriveSetup.dennyhalim"
rem move "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy" "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy.dennyhalim"
rem startmenu disabled if shellex disabled
rem move "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy" "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy.dennyhalim"

wmic.exe USERACCOUNT WHERE "Name='admin'" set PasswordExpires=FALSE
wmic.exe USERACCOUNT WHERE "Name='user'" set PasswordExpires=FALSE

reg.exe load HKLM\DEFAULT "%Public%\..\default\ntuser.dat"
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People /v PeopleBand /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackProgs /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Input\TIPC" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" /v GlobalUserDisabled /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v Value /d Deny /f
reg.exe delete "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /F
reg.exe unload HKLM\DEFAULT

reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v DisableWindowsConsumerFeatures /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v LetAppsRunInBackground /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferUpgrade /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v BranchReadinessLevel /t REG_DWORD /d 32 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdates /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdatesPeriodinDays /t REG_DWORD /d 365 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v AllowCortana /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseCredShared /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseOpen /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" /v 1 /t REG_SZ /d pool.ntp.org /f
reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\sppsvc" /v Start /t REG_DWORD /d 4 /f
reg.exe add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 1 /f

cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon LBP2900" -i "%WINDIR%\Setup\Drivers\CanonLBP2900\CNAB4STD.inf"
cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon G2000 series Printer" -i "%WINDIR%\Setup\Drivers\CanonG2000\Driver\G2000P6.inf"
rem move "%WINDIR%\Setup\Drivers\*" "%WINDIR%\INF"

schtasks.exe /change /TN "\Microsoft\Windows\Setup\SetupCleanupTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\ProgramDataUpdater" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /DISABLE

"%WINDIR%\Setup\Files\chocolatey.exe" /S
"%WINDIR%\Setup\Files\Firefox Setup 52.6.0esr.exe" -ms
"%WINDIR%\Setup\Files\vlc-3.0.1-win64.exe" /L=1033 /S
"%WINDIR%\Setup\Files\SumatraPDF-3.1.2-64-install.exe" /S
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\just-install.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\NpackdCL-1.23.2.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\7z1805-x64.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\qalculate-2.4.0a.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\GoogleChromeStandaloneEnterprise64.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\LibreOffice_5.4.6_Win_x64.msi"
rem "%WINDIR%\Setup\Files\avira_pc_cleaner_en.exe" /s
"%WINDIR%\Setup\Files\mb3-setup-consumer-3.4.5.2467-1.0.342-1.0.4664.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
"%WINDIR%\Setup\Files\avast_business_antivirus_managed_setup_offline_silent.exe"

powershell.exe -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Progs\OpenSSH\install-sshd.ps1"
PowerShell.exe -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Files\setup.ps1"

sc.exe config wuauserv start= demand
sc.exe config DiagTrack start= disabled
sc.exe config dmwappushservice start= disabled
sc.exe config RetailDemo start= disabled
sc.exe config lfsvc start= disabled
sc.exe config ssh-agent start= auto
sc.exe config sshd start= auto

netsh advfirewall firewall add rule dir=in action=allow profile=any protocol=TCP localport=2222 name="sshd"

mkdir "%Public%\Desktop.dennyhalim"
move "%Public%\Desktop\*.*" "%Public%\Desktop.dennyhalim"

rem use powershell for w10 only features
dism.exe /online /norestart /Enable-Feature /FeatureName:TelnetClient
dism.exe /online /norestart /Disable-Feature /FeatureName:MediaPlayback
dism.exe /online /norestart /Disable-Feature /FeatureName:WindowsMediaPlayer
dism.exe /online /norestart /Disable-Feature /FeatureName:WindowsGadgetPlatform
dism.exe /online /norestart /Disable-Feature /FeatureName:Indexing-Service-Package
dism.exe /online /norestart /Disable-Feature /FeatureName:Internet-Explorer-Optional-x86
dism.exe /online /norestart /Disable-Feature /FeatureName:Internet-Explorer-Optional-amd64

powercfg -hibernate on
REAGENTC.EXE /enable
rem "%WINDIR%\Setup-githubbox.exe"
rem shutdown /r /f /t 0

rem dennyhalim.com
rem this will be copied after first reboot and then run after next reboot

rem replace defaultlayouts before it gets created
move "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.dennyhalim"
copy /y "%WINDIR%\Setup\Files\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml"
move "%SystemRoot%\SysWOW64\OneDriveSetup.exe" "%SystemRoot%\SysWOW64\OneDriveSetup.dennyhalim"
move "%SystemRoot%\System32\OneDriveSetup.exe" "%SystemRoot%\System32\OneDriveSetup.dennyhalim"
rem move "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy" "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy.dennyhalim"
rem startmenu disabled if shellex disabled
rem move "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy" "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy.dennyhalim"

wmic.exe USERACCOUNT WHERE "Name='admin'" set PasswordExpires=FALSE
wmic.exe USERACCOUNT WHERE "Name='user'" set PasswordExpires=FALSE

reg.exe load "HKLM\DEFAULT" "%Public%\..\default\ntuser.dat"
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" /v PeopleBand /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackProgs /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Input\TIPC" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" /v GlobalUserDisabled /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v Value /d Deny /f
reg.exe delete "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /F
reg.exe unload "HKLM\DEFAULT"

reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v DisableWindowsConsumerFeatures /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v LetAppsRunInBackground /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferUpgrade /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v BranchReadinessLevel /t REG_DWORD /d 32 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdates /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdatesPeriodinDays /t REG_DWORD /d 365 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v AllowCortana /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseCredShared /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseOpen /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" /v 1 /t REG_SZ /d pool.ntp.org /f
reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\sppsvc" /v Start /t REG_DWORD /d 4 /f
reg.exe add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 1 /f

cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon LBP2900" -i "%WINDIR%\Setup\Drivers\CanonLBP2900\CNAB4STD.inf"
cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon G2000 series Printer" -i "%WINDIR%\Setup\Drivers\CanonG2000\Driver\G2000P6.inf"
rem move "%WINDIR%\Setup\Drivers\*" "%WINDIR%\INF"

schtasks.exe /change /TN "\Microsoft\Windows\Setup\SetupCleanupTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\ProgramDataUpdater" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /DISABLE

"%WINDIR%\Setup\Files\chocolatey.exe" /S
"%WINDIR%\Setup\Files\Firefox Setup 52.6.0esr.exe" -ms
"%WINDIR%\Setup\Files\vlc-3.0.1-win64.exe" /L=1033 /S
"%WINDIR%\Setup\Files\SumatraPDF-3.1.2-64-install.exe" /S
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\just-install.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\NpackdCL-1.23.2.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\7z1805-x64.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\qalculate-2.4.0a.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\GoogleChromeStandaloneEnterprise64.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\LibreOffice_5.4.6_Win_x64.msi"
rem "%WINDIR%\Setup\Files\avira_pc_cleaner_en.exe" /s
"%WINDIR%\Setup\Files\mb3-setup-consumer-3.4.5.2467-1.0.342-1.0.4664.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
"%WINDIR%\Setup\Files\avast_business_antivirus_managed_setup_offline_silent.exe"

powershell.exe -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Progs\OpenSSH\install-sshd.ps1"
PowerShell.exe -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Files\setup.ps1"

sc.exe config wuauserv start= demand
sc.exe config DiagTrack start= disabled
sc.exe config dmwappushservice start= disabled
sc.exe config RetailDemo start= disabled
sc.exe config lfsvc start= disabled
sc.exe config ssh-agent start= auto
sc.exe config sshd start= auto

netsh advfirewall firewall add rule dir=in action=allow profile=any protocol=TCP localport=2222 name="sshd"

mkdir "%Public%\Desktop.dennyhalim"
move "%Public%\Desktop\*.*" "%Public%\Desktop.dennyhalim"

rem use powershell for w10 only features
dism.exe /online /norestart /Enable-Feature /FeatureName:TelnetClient
dism.exe /online /norestart /Disable-Feature /FeatureName:MediaPlayback
dism.exe /online /norestart /Disable-Feature /FeatureName:WindowsMediaPlayer
dism.exe /online /norestart /Disable-Feature /FeatureName:WindowsGadgetPlatform
dism.exe /online /norestart /Disable-Feature /FeatureName:Indexing-Service-Package
dism.exe /online /norestart /Disable-Feature /FeatureName:Internet-Explorer-Optional-x86
dism.exe /online /norestart /Disable-Feature /FeatureName:Internet-Explorer-Optional-amd64

powercfg -hibernate on
REAGENTC.EXE /enable
rem "%WINDIR%\Setup-githubbox.exe"
rem shutdown /r /f /t 0

Update SetupComplete.cmd

Update SetupComplete.cmd