Share
Go down
avatar
ajarbas

Building the folder $OEM$ - Silent install - Review

on Fri 2 Feb 2018 - 0:56
Message reputation : 100% (2 votes)
Run the script:
The script creates the% OEM% and App_install folder. Put all your installers in the X: \ app_install folder, where "X: \" represents the drive with your preference.
The script will construct at the end the script "setupcomplete.cmd" and send it to the corresponding folder: X: \ $ oem $ \ $$ \ setup \ scripts the same to the X: \ App_install folder the script will send the installers to the corresponding folder also: X: \ $ oem $ \ $ 1 \ setup \ files.
After completing the process, the $ OEM $ folder will be ready and copy with Winreducer or drag it into the X: \ Dvd \ sources folder; folder where the offline system is located.
Save the script with the name of your choice.
Details:
Script limits: Only works with the * .exe extension.
The folder is added to the root: C: \ Setup \ Files and at the end is deleted. Good luck...
Save the script as your preferred name. Example: Create_oem_install.cmd

Installs applications before the first login.
Code:
@echo off
title integrating oem folder
set app_install="%~dp0app_install"
set fldr_oem_setup="%~dp0$oem$\$1\setup\files"
set fldr_oem_script="%~dp0$oem$\$$\setup\scripts"
set oem="%~dp0$oem$"
set app="%~dp0oem_w7\$oem$\$1\setup\files"
set sctp_cplt="%~dp0dvd\sources\$oem$\$$\setup\scripts"
set clear="%systemdrive%\setup\files"
echo bulding folder "$oem$"
rd /s /q %oem%
md %fldr_oem_setup%
md %fldr_oem_script%
md %app_install%
xcopy /e /i /h /r /k /y /j %app_install% %fldr_oem_setup%
del /s /q %~dp0setupcomplete.cmd
echo @echo off >>%~dp0setupcomplete.cmd
echo title installing applications >>setupcomplete.cmd
echo echo please wait...>>%~dp0setupcomplete.cmd
cd %app_install%
@echo on
for %%i in (*.exe) do echo "%systemdrive%\setup\files\%%i" >>%~dp0setupcomplete.cmd
@echo off
echo rd /s /q %clear% >>%~dp0setupcomplete.cmd
echo exit >>%~dp0setupcomplete.cmd
move /y %~dp0setupcomplete.cmd %fldr_oem_script%
pause

Installs applications after first login.
x64 - bit - system

Code:
@echo off
title integrating oem folder
echo ===========================================================================
echo OEM for x64 - bits
echo============================================================================
set app_install="%~dp0app_install"
set fldr_oem_setup="%~dp0$oem$\$1\setup\files"
set fldr_oem_script="%~dp0$oem$\$$\setup\scripts"
set oem="%~dp0$oem$"
set clear="%systemdrive%\setup\files"
echo bulding folder "$oem$"
rd /s /q %oem%
md %fldr_oem_setup%
md %fldr_oem_script%
md %app_install%
echo.
echo copy the installers to the folder
echo.
xcopy /e /i /h /r /k /y /j %app_install% %fldr_oem_setup%
echo.
echo write script install_cmd.cmd
echo.
del /s /q %~dp0install_cmd.cmd
del /s /q %~dp0install_cmd.tmp
echo @echo off >>%~dp0install_cmd.tmp
//echo cmdow @ /hid >>%~dp0install_cmd.tmp
echo title installing applications >>%~dp0install_cmd.tmp
echo echo please wait... >>%~dp0install_cmd.tmp
cd %app_install%
for %%i in (*.exe) do echo "%systemdrive%\setup\files\%%i" >>%~dp0install_cmd.tmp
echo rd /s /q "%systemdrive%\setup" >>%~dp0install_cmd.tmp
echo exit >>%~dp0install_cmd.tmp
ren %~dp0install_cmd.tmp install_cmd.cmd
move /y %~dp0install_cmd.cmd %fldr_oem_setup%
echo.
echo write script setupcomplete.cmd
echo.
del /s /q %~dp0setupcomplete.cmd
del /s /q %~dp0setupcomplete.tmp
echo @echo off >>%~dp0setupcomplete.tmp
//echo cmdow @ /hid >>%~dp0setupcomplete.tmp
echo title installing applications >>%~dp0setupcomplete.tmp
echo echo please wait... >>%~dp0setupcomplete.tmp
echo cd %systemroot%\system32 >>%~dp0setupcomplete.tmp
echo reg.exe add "hklm\software\wow6432node\microsoft\windows\currentversion\runonce" /v "runitonce_install_tmp" /t reg_sz /d "\"%systemdrive%\setup\files\install_cmd.cmd\"" /f >>%~dp0setupcomplete.tmp
echo exit >>%~dp0setupcomplete.tmp
ren %~dp0setupcomplete.tmp setupcomplete.cmd
move /y %~dp0setupcomplete.cmd %fldr_oem_script%
pause

Installs applications after first login.
x86 - bit - system

Code:
@echo off
title integrating oem folder
echo ===========================================================================
echo OEM for x86 - bits
echo============================================================================
set app_install="%~dp0app_install"
set fldr_oem_setup="%~dp0$oem$\$1\setup\files"
set fldr_oem_script="%~dp0$oem$\$$\setup\scripts"
set oem="%~dp0$oem$"
set clear="%systemdrive%\setup\files"
echo bulding folder "$oem$"
rd /s /q %oem%
md %fldr_oem_setup%
md %fldr_oem_script%
md %app_install%
echo.
echo copy the installers to the folder
echo.
xcopy /e /i /h /r /k /y /j %app_install% %fldr_oem_setup%
echo.
echo write script install_cmd.cmd
echo.
del /s /q %~dp0install_cmd.cmd
del /s /q %~dp0install_cmd.tmp
echo @echo off >>%~dp0install_cmd.tmp
//echo cmdow @ /hid >>%~dp0install_cmd.tmp
echo title installing applications >>%~dp0install_cmd.tmp
echo echo please wait... >>%~dp0install_cmd.tmp
cd %app_install%
for %%i in (*.exe) do echo "%systemdrive%\setup\files\%%i" >>%~dp0install_cmd.tmp
echo rd /s /q "%systemdrive%\setup" >>%~dp0install_cmd.tmp
echo exit >>%~dp0install_cmd.tmp
ren %~dp0install_cmd.tmp install_cmd.cmd
move /y %~dp0install_cmd.cmd %fldr_oem_setup%
echo.
echo write script setupcomplete.cmd
echo.
del /s /q %~dp0setupcomplete.cmd
del /s /q %~dp0setupcomplete.tmp
echo @echo off >>%~dp0setupcomplete.tmp
//echo cmdow @ /hid >>%~dp0setupcomplete.tmp
echo title installing applications >>%~dp0setupcomplete.tmp
echo echo please wait... >>%~dp0setupcomplete.tmp
echo cd %systemroot%\system32 >>%~dp0setupcomplete.tmp
echo reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v "runitonce_install_tmp" /t reg_sz /d "\"%systemdrive%\setup\files\install_cmd.cmd\"" /f >>%~dp0setupcomplete.tmp
echo exit >>%~dp0setupcomplete.tmp
ren %~dp0setupcomplete.tmp setupcomplete.cmd
move /y %~dp0setupcomplete.cmd %fldr_oem_script%
pause





Last edited by ajarbas on Thu 12 Apr 2018 - 2:50; edited 1 time in total
avatar
KrX

Re: Building the folder $OEM$ - Silent install - Review

on Fri 2 Feb 2018 - 18:54
Message reputation : 100% (1 vote)
very nice script. thank you
avatar
ajarbas

Re: Building the folder $OEM$ - Silent install - Review

on Thu 12 Apr 2018 - 2:53
KrX wrote:very nice script. thank you

Ok main all rigth.  Laughing
Back to top
Permissions in this forum:
You cannot reply to topics in this forum