IF EXIST "%DRIVE%\support\Activate.cmd" ( REM Auto-install %ARCH% independent MSI packagesįOR %%C IN ("%DRIVE%\setup\*-all.msi") DO ( REG ADD %ROE%\003 /v "%%~nC" /d "msiexec /i %%C /quiet /norestart" /f REM Auto-install %ARCH% depend MSI packagesįOR %%C IN ("%DRIVE%\setup\*-%ARCH%.msi") DO (įOR /F "tokens=1 delims=-" %%G IN ("%%~nC") DO (įor /F "usebackq tokens=*" %%A in ("%DRIVE%\setup\%%G.txt") do ( REG ADD %ROE%\002 /v "MSO" /d "%DRIVE%\office\YAOCTRIR_Installer.cmd" /f ![]() IF EXIST "%DRIVE%\office\YAOCTRIR_Installer.cmd" ( REG ADD %ROE%\002 /v "MSO" /d "%DRIVE%\office\YAOCTRI_Installer.cmd" /f IF EXIST "%DRIVE%\office\YAOCTRI_Installer.cmd" ( REM Auto-install Microsoft Office 2019 / 365 REG ADD %ROE%\002 /v "MSO" /d "%DRIVE%\office\All\setup.exe" /f ) ELSE IF EXIST "%DRIVE%\office\All\setup.exe" ( IF EXIST "%DRIVE%\office\%ARCH%\setup.exe" ( REM Auto-install Microsoft Office 2008 - 2016 REG ADD %ROE%\001 /v "%%~nU_Root" /d "%WINDIR%\System32\certutil.exe -addstore Root %%U" /f REG ADD %ROE%\001 /v "%%~nU_CA" /d "%WINDIR%\System32\certutil.exe -addstore CA %%U" /f REG ADD %ROE%\001 /v "%%~nU_My" /d "%WINDIR%\System32\certutil.exe -addstore My %%U" /f REG ADD %ROE%\001 /v "%%~nU_TrustedPublisher" /d "%WINDIR%\System32\certutil.exe -addstore TrustedPublisher %%U" /f REM Install certificates into My / Root / CA store REG ADD %ROE%\000 /v "KillExplorer" /d "%WINDIR%\System32\cmd.exe /c \"start /min /wait %WINDIR%\setup\scripts\Watcher.cmd\"" /f IF NOT EXIST "%WINDIR%\Servicing\Version\6.1.*" ( IF EXIST "%WINDIR%\System32\iernonce.dll" ( SET ROE=HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx IF "%DRIVE%" = "" FOR %%I IN (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%I:\sources\install.swm SET DRIVE=%%I: IF "%DRIVE%" = "" FOR %%I IN (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%I:\sources\install.wim SET DRIVE=%%I: SET OFFTEXT="Installing Microsoft Office"įOR %%I IN (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%I:\sources\install.esd SET DRIVE=%%I: Save text bellow as OOBE.cmd into Scripts folder you created in previous off You also need Scripts folder inside sources\$OEM$\$$\Setup\Scripts - this folder is needed to call OOBE.cmd as this script is natively called by Windows Setup in all situations not like SetupComplete.cmd and OEM key "problem" Lets start with preparing needed folder structure on your setup media Just protect these files 3 (6) files in components section in NTLite, you don't need to do it manually, just download and use attached preset RunOnceEx_Protector.xml If you want to remove Internet Explorer, you can still use this method! So this mean you need to have Internet Explorer component in your Windows install.wim / install.esd. RunOnceEx is really old but still working method as part of iernonce.dll + + IEAdvpack.dll (This file exist from Internet Explorer 9+, so doesn't exist in non updated Windows 7). We are going to use RunOnceEx method as its most comfortable and suitable way because it is inbox Windows component. What you can easily install using this tutorial?Ģ) Windows or Office updates (MSU / CAB / MSP)ģ) Your own applications with predefined switchĮvery installation steps are run before user logon after OOBE, this mean User Account is already created so all applications and registry tweaks should be installed without problem If you want to know more, read this and this.This tutorial helps you to create perfect post setup for Windows 7 - 10 setup media ![]() NtLite and these PowerShell tools all use the Deployment Image Servicing Manager tool, DISM, and its C# libraries to actually enact the changes. When that's done, you save the changes using: Dismount-WindowsImage -Path "c:\offline" -Save Disable-WindowsOptionalFeature -Path "c:\offline" -FeatureName "Calc" -PackageName ![]() Next, to disable the feature in the Windows Image. This would mount the image to your c:\Offline folder. Mount-WindowsImage -ImagePath "c:\imagestore\install.vhd" -Index 1 -Path "c:\offline" If you wanted to remove it from a Windows Image instead, first you have to mount the Windows image by mounting install.wim from the disc using the Mount-WindowsImage cmdlet, like this. You can do that in your running Windows Instance using this command (when running PowerShell as an Administrator) Disable-WindowsOptionalFeature -Online -FeatureName "Calc" -PackageName Let's say you wanted to remove the new Calc.exe and return to the old, correct Calc.exe app. If you want to remove elements from Windows, you can do that using the Add-WindowsOptionalFeature and Remove-WindowsOptionalFeature PowerShell Cmdlets.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |