All-in-one Update and customization of win7 ISO by Windows AIK and ( RT7Lite OR CMD)

Discussion in 'Windows 7' started by monyzoom, Aug 29, 2014.

  1. monyzoom

    monyzoom MDL Novice

    Oct 6, 2013
    10
    1
    0
    #1 monyzoom, Aug 29, 2014
    Last edited by a moderator: Apr 20, 2017
    Here is my tutorial to update and customize win7 by Windows AIK and RT7Lite.

    keep the Command script files your edited system files in folder

    Required software:
    windows7 (authentic)
    Windows AIK 3.0 (i have used it)
    Rt7Lite

    Folder tree(The folder name should be very short & keep he batCommand scriptch files in it ):
    uploaded pic will giveyou an idead.
    Don't change the file names if you do then change them in BatCommand scriptch files too.- Important
    files in the folder excluding those in pic.
    Apple-Dell-Logo1.bmp (according to your laptop logo size)
    background.bmp
    background_cli.bmp
    backgroundDefault.jpeg
    basebrd.dll.mui -- customized
    FirstUXBackground.bmp ---- must be of 1024*768
    notepad.exe ---------- (notepad2 software very useful,copy the exe file and name it notepad.exe)
    notepad.ini---------------(same software the .ini file in it )
    setup.bmp
    setup.exe.mui -----------customized
    spwizimg.dll ------------customized
    w32uires.dll.mui---------customized
    wininit.exe.mui----------customized
    winlogon.exe.mui---------customized
    winpe.bmp ----------------

    for the customized DLL file google around, you will find tutorial to edit them.
    resolution size of pics are your default screen size unless otherwise mentioned.

    For update integration in 1st baCommand scripttch file
    make folders in system drive i.e. C:\7MSDN.

    Make another folder "integration", and keep the updates as shown in pics uploaded .


    folder tree.jpg integration.jpg
    Thank you "murphy78" for update list

    Code:
    cd /d %~dp0 
    @ECHO OFF
    SET DVDSOURCE=%systemdrive%\7MSDN
    SET MOUNTDIR=%systemdrive%\mount
    SET SUBMOUNTDIR=%systemdrive%\mount2
    SET FirstUXRes=%systemdrive%\FirstUXRes
    SET STORE1=D:\7ISO\WIM
    SET STORE2=D:\7ISO\ISO
    SET TRASH=c:\temp\trash
    SET TRASH2=c:\temp\trash2
    SET MOUNTNUM=
    SET ImageDescription=
    SET DISM=%systemdrive%\Program Files\Windows AIK\Tools\Servicing\Dism.exe
    if ERRORLEVEL 1 SET /p DISM=%~dp0DISM.EXE
    SET imagex=%systemdrive%\Program Files\Windows AIK\Tools\amd64\imagex.exe
    if ERRORLEVEL 1 SET /p imagex=%~dp0imagex.exe
    SET oscdimg=%systemdrive%\Program Files\Windows AIK\Tools\amd64\oscdimg.exe
    if ERRORLEVEL 1 SET /p oscdimg=%~dp0oscdimg.exe
    ECHO.
    ECHO This script will modify Setup images on the 7 DVD and inside sources\install.wim
    ECHO Make sure to have pre-prepared your spwizimg.dll and imageres.dll files.
    ECHO The script will use spwizimg.dll and imageres.dll for 32-bit images,
    ECHO and spwizimg.dll and imageres.dll for 64-bit images.
    ECHO.
    ECHO Also make sure to have the Windows 7 AIK installed or have these 
    echo (dism.exe,imagex.exe,oscdimg.exe)the DVD extracted to an editable folder,
    ECHO The custom name/description what i have given is "RT7Ultimate-x64" .
    ECHO.
    ECHO.
    IF EXIST "%MOUNTDIR%" (
    ECHO cleaning up previous run
    IF EXIST "%MOUNTDIR%" DISM /cleanup-wim
    IF EXIST "%MOUNTDIR%" DISM /Unmount-Wim /MountDir:"%MOUNTDIR%" /discard
    IF EXIST "%MOUNTDIR%" RMDIR /s /Q "%MOUNTDIR%"
    IF EXIST "%MOUNTDIR%" TAKEOWN /F "%MOUNTDIR%" /R
    IF EXIST "%MOUNTDIR%" ICACLS "%MOUNTDIR%" /T /L /GRANT Administrators:FD
    IF EXIST "%MOUNTDIR%" RMDIR /s /Q "%MOUNTDIR%"
    )
    IF EXIST "%SUBMOUNTDIR%" (
    IF EXIST "%SUBMOUNTDIR%" DISM /Unmount-Wim /MountDir:"%SUBMOUNTDIR%" /discard
    IF EXIST "%SUBMOUNTDIR%" RMDIR /s /Q "%SUBMOUNTDIR%"
    IF EXIST "%SUBMOUNTDIR%" TAKEOWN /F "%SUBMOUNTDIR%" /R
    IF EXIST "%SUBMOUNTDIR%" ICACLS "%SUBMOUNTDIR%" /T /L /GRANT Administrators:FD
    IF EXIST "%SUBMOUNTDIR%" RMDIR /s /Q "%SUBMOUNTDIR%"
    )
    IF EXIST "%FirstUXRes%" (
    IF EXIST "%FirstUXRes%" TAKEOWN /F "%FirstUXRes%" /R
    IF EXIST "%FirstUXRes%" ICACLS "%FirstUXRes%" /T /L /GRANT Administrators:FD
    IF EXIST "%FirstUXRes%" RMDIR /s /Q "%FirstUXRes%"
    )
    
    
    IF EXIST "%TRASH%" (
    IF EXIST "%TRASH%" TAKEOWN /F "%TRASH%" /R
    IF EXIST "%TRASH%" ICACLS "%TRASH%" /T /L /GRANT Administrators:FD
    IF EXIST "%TRASH%" RMDIR /s /Q "%TRASH%"
    )
    echo clean process done
    echo Temporary Deletation phase check if its done ok.
    ECHO From this point onwards files will be modified. 
    ECHO If you wish to quit, please close the program now.
    pause
    mkdir %MOUNTDIR%
    mkdir %SUBMOUNTDIR%
    mkdir %FirstUXRes%
    mkdir %TRASH%
    SET /P MOUNTNUM=Path to IMAGE NUMBER:
    SET /P ImageDescription=windows 7 image Description:
    CHOICE /c 1234 /m "select 1 for updates only ,select 2 for cusomization only, select 3 for upadate & customization and select 4 for Rt7lite customization":
    if errorlevel==4 goto :Rt7lite customization
    if errorlevel==3 goto upadate & customization
    if errorlevel==2 goto Customization only
    if errorlevel==1 goto updates only
    
    
    
    
    
    
    :upadate & customization
    call :updatesonly
    call :customizationonly
    goto :finish
    
    
    
    
    :customization only
    call :customizationonly
    exit
    
    
    :updates only
    call :updatesonly
    shutdown /s /t 10
    exit
    
    
    
    
    :updatesonly
    ECHO Updating Windows 7 ISO.
    DISM /mount-wim /wimfile:%DVDSOURCE%\sources\install.wim /index:%MOUNTNUM% /mountdir:%MOUNTDIR%
    dism /image:c:\mount /add-package /packagepath:c:\integration\1-PreReqs
    dism /image:c:\mount /add-package /packagepath:c:\integration\2-IE
    dism /image:c:\mount /add-package /packagepath:c:\integration\3-MainUpdates
    dism /image:c:\mount /add-package /packagepath:c:\integration\4-2ndPass
    dism /image:c:\mount /add-package /packagepath:c:\integration\5-IEUpdates
    dism /image:c:\mount /add-package /packagepath:c:\integration\6-SelfUpdate
    dism /unmount-wim /mountdir:c:\mount /commit
    IF EXIST "%STORE1%" RMDIR /s /Q "%STORE1%"
    mkdir %STORE1%
    imagex /compress maximum /export %DVDSOURCE%\sources\install.wim %MOUNTNUM% %STORE1%\install.wim  "%ImageDescription%"
    if %MOUNTNUM%==4 call :ultimate
    if %MOUNTNUM%==1 call :homebasic 
    xcopy /Y %STORE1%\install.wim %DVDSOURCE%\sources\install.wim
    goto :eof
    
    
    :homebasic 
    imagex /delete %STORE1%\install.wim 2
    imagex /delete %STORE1%\install.wim 2
    imagex /delete %STORE1%\install.wim 2
    del /Q "%DVDSOURCE%\sources\ei.cfg"
    DEL /Q "%DVDSOURCE%\sources\install_Windows 7 HOMEPREMIUM.clg"
    DEL /Q "%DVDSOURCE%\sources\install_Windows 7 PROFESSIONAL.clg"
    DEL /Q "%DVDSOURCE%\sources\install_Windows 7 ULTIMATE.clg"
    goto :eof
    
    
    :ultimate
    imagex /delete %STORE1%\install.wim 1
    imagex /delete %STORE1%\install.wim 1
    imagex /delete %STORE1%\install.wim 1
    del /Q "%DVDSOURCE%\sources\ei.cfg"
    DEL /Q "%DVDSOURCE%\sources\install_Windows 7 HOMEBASIC.clg"
    DEL /Q "%DVDSOURCE%\sources\install_Windows 7 HOMEPREMIUM.clg"
    DEL /Q "%DVDSOURCE%\sources\install_Windows 7 PROFESSIONAL.clg"
    goto :eof
    
    
    :customizationonly
    DISM /mount-wim /wimfile:%DVDSOURCE%\sources\install.wim /index:%MOUNTNUM% /mountdir:%MOUNTDIR%
    dism /image:c:\mount /Disable-Feature /FeatureName:"More Games"
    dism /image:c:\mount /Disable-Feature /FeatureName:WindowsGadgetPlatform
    dism /image:c:\mount /Disable-Feature /FeatureName:”Internet Games”
    dism /image:c:\mount /Disable-Feature /FeatureName:Chess
    dism /image:c:\mount /Disable-Feature /FeatureName:PurblePlace
    dism /image:c:\mount /Disable-Feature /FeatureName:Shanghai
    dism /image:c:\mount /Disable-Feature /FeatureName:MediaPlayback
    dism /image:c:\mount /Disable-Feature /FeatureName:MediaCenter
    dism /image:c:\mount /Disable-Feature /FeatureName:OpticalMediaDisc
    dism /image:c:\mount /Disable-Feature /FeatureName:WindowsMediaPlayer
    dism /image:c:\mount /Set-UILang:en-US             
    dism /image:c:\mount /set-timezone:"India Standard Time"
    dism /image:c:\mount /Set-UserLocale:en-US
    :: I still haven't modified or tested the code
    ::ECHO Mounting install.wim to %MOUNTDIR%
    ::DISM /mount-wim /wimfile:%DVDSOURCE%\sources\install.wim /index:%MOUNTNUM% /mountdir:%MOUNTDIR%
    ECHO Modifying  WimRegistry_SYSTEM hive
    ECHO Edit/merge WimRegistry_SYSTEM hive :- SYSTEM
    reg load HKLM\WimRegistry_SYSTEM c:\mount\windows\system32\config\SYSTEM
    :: this part windows defender has problem incorporating in to the system
    ::ECHO for windefender
    ::REG add "HKEY_LOCAL_MACHINE\WimRegistry_SYSTEM\ControlSet001\services\WinDefend" /v Start /t REG_DWORD /d 4 /f
    ::REG add "HKEY_LOCAL_MACHINE\WimRegistry_SYSTEM\ControlSet001\services\WinDefend" /v DelayedAutoStart /t REG_DWORD /d 4 /f
    ::REG add "HKEY_LOCAL_MACHINE\WimRegistry_SYSTEM\ControlSet002\services\WinDefend" /v Start /t REG_DWORD /d 4 /f
    ::REG add "HKEY_LOCAL_MACHINE\WimRegistry_SYSTEM\ControlSet002\services\WinDefend" /v DelayedAutoStart /t REG_DWORD /d 4 /f
    ECHO for hibernation
    REG add "HKEY_LOCAL_MACHINE\WimRegistry_SYSTEM\ControlSet001\Control\Power" /v CustomizeDuringSetup /t REG_DWORD /d 0 /f
    REG add "HKEY_LOCAL_MACHINE\WimRegistry_SYSTEM\ControlSet001\Control\Power" /v HiberFileSizePercent /t REG_DWORD /d 0 /f
    REG add "HKEY_LOCAL_MACHINE\WimRegistry_SYSTEM\ControlSet001\Control\Power" /v HibernateEnabled /t REG_DWORD /d 0 /f
    REG add "HKEY_LOCAL_MACHINE\WimRegistry_SYSTEM\ControlSet002\Control\Power" /v CustomizeDuringSetup /t REG_DWORD /d 0 /f
    REG add "HKEY_LOCAL_MACHINE\WimRegistry_SYSTEM\ControlSet002\Control\Power" /v HiberFileSizePercent /t REG_DWORD /d 0 /f
    REG add "HKEY_LOCAL_MACHINE\WimRegistry_SYSTEM\ControlSet002\Control\Power" /v HibernateEnabled /t REG_DWORD /d 0 /f
    reg unload HKLM\WimRegistry_SYSTEM
    ECHO Edit/merge WimRegistry_SOFTWARE hive :- software
    reg load HKLM\WimRegistry_SOFTWARE c:\mount\windows\system32\config\sotware
    ::echo this part has problem refering to the installing on system
    ECHO for oem logo and information
    REG add "HKEY_LOCAL_MACHINE\WimRegistry_SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" /v Manufacturer /d Dell /f
    REG add "HKEY_LOCAL_MACHINE\WimRegistry_SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" /v Model /d N4010 /f
    REG add "HKEY_LOCAL_MACHINE\WimRegistry_SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" /v Logo /d windows\\System32\\oobe\\Apple-Dell-Logo1.bmp /f
    REG add "HKEY_LOCAL_MACHINE\WimRegistry_SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" /v SupportPhone /d 18004254026 /f
    REG add "HKEY_LOCAL_MACHINE\WimRegistry_SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" /v SupportURL /d your link /f
    REG add "HKEY_LOCAL_MACHINE\WimRegistry_SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" /v SupportHours /d "In India, 24 hours a day, 7 days a week" /f
    ECHO for Windows defender
    REG add "HKEY_LOCAL_MACHINE\WimRegistry_SOFTWARE\Microsoft\Windows Defender" /v DisableAntiSpyware /t REG_DWORD /d 1 /f
    reg unload HKLM\WimRegistry_SOFTWARE
    :: i dont know what to disable using this section
    ::ECHO Edit/merge WimRegistry_NTUSER hive :- ntuser.dat
    ::reg load HKLM\WimRegistry_NTUSER c:\mount\windows\system32\config\ntuser.dat
    ::reg import %~dp0WimRegistry_NTUSERntuserdat.reg 
    ::reg unload HKLM\WimRegistry_NTUSER
    DISM /unmount-wim /mountdir:%MOUNTDIR%  /commit
    
    
    :::::::::::::::::::::::::::::::for install.wim::::::::::::::::::::::::
    ECHO Mounting install.wim index:%MOUNTNUM% to %MOUNTDIR%
    DISM /mount-wim /wimfile:%DVDSOURCE%\sources\install.wim /index:%MOUNTNUM% /mountdir:%MOUNTDIR%
    
    
    :: For W32UIRes
    ECHO Modifying "%MOUNTDIR%\Windows\System32\oobe\en-US\W32UIRes.dll.mui"
    TAKEOWN /a /f "%MOUNTDIR%\Windows\System32\oobe\en-US\W32UIRes.dll.mui"
    icacls "%MOUNTDIR%\Windows\System32\oobe\en-US\W32UIRes.dll.mui" /Grant Administrators:F
    Copy /Y "%~dp0W32UIRes.dll.mui" "%MOUNTDIR%\Windows\System32\oobe\en-US\W32UIRes.dll.mui"
    
    
    ::For Basebrd
    ECHO Modifying "basebrd.dll.mui"
    takeown /a /f "%MOUNTDIR%\Windows\Branding\Basebrd\en-US\basebrd.dll.mui"
    icacls "%MOUNTDIR%\Windows\Branding\Basebrd\en-US\basebrd.dll.mui" /Grant Administrators:F
    Copy /Y "%~dp0basebrd.dll.mui" "%MOUNTDIR%\Windows\Branding\Basebrd\en-US\basebrd.dll.mui"
    
    
    ::For Notepad
    echo modifying notepad in windows
    takeown /a /f "%MOUNTDIR%\Windows\notepad.exe" 
    icacls "%MOUNTDIR%\Windows\notepad.exe" /Grant Administrators:F
    Copy /Y "%~dp0notepad.exe" "%MOUNTDIR%\Windows\notepad.exe"
    echo modifying notepad in system32
    takeown /a /f "%MOUNTDIR%\Windows\System32\notepad.exe" 
    icacls "%MOUNTDIR%\Windows\System32\notepad.exe" /Grant Administrators:F
    Copy /Y "%~dp0notepad.exe" "%MOUNTDIR%\Windows\System32\notepad.exe"
    echo modifying notepad in SysWOW64
    takeown /a /f "%MOUNTDIR%\Windows\SysWOW64\notepad.exe" 
    icacls "%MOUNTDIR%\Windows\SysWOW64\notepad.exe" /Grant Administrators:F
    Copy /Y "%~dp0notepad.exe" "%MOUNTDIR%\Windows\SysWOW64\notepad.exe"
    Copy /Y "%~dp0notepad.ini" "%MOUNTDIR%\Users\Administrator\AppData\Roaming\notepad.ini"
    
    
    :: For windows shutdown text
    echo modifying windows shutdown text
    takeown /a /f "%MOUNTDIR%\Windows\System32\en-US\wininit.exe.mui" 
    icacls "%MOUNTDIR%\Windows\System32\en-US\wininit.exe.mui" /Grant Administrators:F
    Copy /Y "%~dp0wininit.exe.mui" "%MOUNTDIR%\Windows\System32\en-US\wininit.exe.mui"
    takeown /a /f "%MOUNTDIR%\Windows\SysWOW64\en-US\wininit.exe.mui" 
    icacls "%MOUNTDIR%\Windows\SysWOW64\en-US\wininit.exe.mui" /Grant Administrators:F
    Copy /Y "%~dp0wininit.exe.mui" "%MOUNTDIR%\Windows\SysWOW64\en-US\wininit.exe.mui"
    
    
    :: For windows logon text
    echo modifying  windows logon text
    takeown /a /f "%MOUNTDIR%\Windows\System32\en-US\winlogon.exe.mui" 
    icacls "%MOUNTDIR%\Windows\System32\en-US\winlogon.exe.mui" /Grant Administrators:F
    Copy /Y "%~dp0winlogon.exe.mui" "%MOUNTDIR%\Windows\System32\en-US\winlogon.exe.mui"
    
    
    :: For Spwizimg.dll
    ECHO Modifying "%MOUNTDIR%\Windows\System32\spwizimg.dll"
    TAKEOWN /a /f "%MOUNTDIR%\Windows\System32\spwizimg.dll"
    icacls "%MOUNTDIR%\Windows\System32\spwizimg.dll" /Grant Administrators:F
    DEL /Q "%MOUNTDIR%\Windows\System32\spwizimg.dll"
    Copy /Y "%~dp0spwizimg.dll" "%MOUNTDIR%\Windows\System32\spwizimg.dll"
    ECHO Modifying "%MOUNTDIR%\Windows\syswow64\spwizimg.dll"
    takeown /a /f "%MOUNTDIR%\Windows\syswow64\spwizimg.dll" 
    icacls "%MOUNTDIR%\Windows\syswow64\spwizimg.dll" /Grant Administrators:F
    DEL /Q "%MOUNTDIR%\Windows\syswow64\spwizimg.dll"
    Copy /Y "%~dp0spwizimg.dll" "%MOUNTDIR%\Windows\syswow64\spwizimg.dll"
    
    
    ::For Imageres.dll
    ECHO Modifying "%MOUNTDIR%\Windows\System32\imageres.dll"
    TAKEOWN /a /f "%MOUNTDIR%\Windows\System32\imageres.dll"
    icacls "%MOUNTDIR%\Windows\System32\imageres.dll" /Grant Administrators:F
    DEL /Q "%MOUNTDIR%\Windows\System32\imageres.dll"
    Copy /Y "%~dp0imageres.dll" "%MOUNTDIR%\Windows\System32\imageres.dll"
    ECHO Modifying "%MOUNTDIR%\Windows\syswow64\imageres.dll"
    takeown /a /f "%MOUNTDIR%\Windows\syswow64\imageres.dll" 
    icacls "%MOUNTDIR%\Windows\syswow64\imageres.dll" /Grant Administrators:F
    DEL /Q  "%MOUNTDIR%\Windows\syswow64\imageres.dll"
    Copy /Y "%~dp0imageres.dll" "%MOUNTDIR%\Windows\syswow64\imageres.dll"
    
    
    :: For background.bmp
    ECHO Modifying "%MOUNTDIR%\Windows\System32\oobe\background.bmp"
    TAKEOWN /a /f "%MOUNTDIR%\Windows\System32\oobe\background.bmp"
    icacls "%MOUNTDIR%\Windows\System32\oobe\background.bmp" /Grant Administrators:F
    DEL /Q  "%MOUNTDIR%\Windows\System32\oobe\background.bmp"
    Copy /Y "%~dp0background.bmp" "%MOUNTDIR%\Windows\System32\oobe\background.bmp"
    ECHO Modifying "%MOUNTDIR%\Windows\syswow64\oobe\background.bmp"
    takeown /a /f "%MOUNTDIR%\Windows\syswow64\oobe\background.bmp" 
    icacls "%MOUNTDIR%\Windows\syswow64\oobe\background.bmp" /Grant Administrators:F
    DEL /Q  "%MOUNTDIR%\Windows\syswow64\oobe\background.bmp"
    Copy /Y "%~dp0background.bmp" "%MOUNTDIR%\Windows\syswow64\oobe\background.bmp" 
    
    
    :: For Patched Uxtheme
    ECHO Modifying windows patched -UXtheme
    takeown /a /f "%MOUNTDIR%\Windows\System32\uxtheme.dll"
    icacls "%MOUNTDIR%\Windows\System32\uxtheme.dll" /Grant Administrators:F
    DEL /Q %MOUNTDIR%\Windows\System32\uxtheme.dll 
    Copy /Y "%~dp0UxTheme\x64\uxtheme.dll" "%MOUNTDIR%\Windows\System32\uxtheme.dll"
    ECHO Modifying "%MOUNTDIR%\Windows\SysWOW64\uxtheme.dll"
    takeown /a /f "%MOUNTDIR%\Windows\SysWOW64\uxtheme.dll"
    icacls "%MOUNTDIR%\Windows\SysWOW64\uxtheme.dll" /Grant Administrators:F
    DEL /Q %MOUNTDIR%\Windows\SysWOW64\uxtheme.dll 
    Copy /Y "%~dp0UxTheme\x86\uxtheme.dll" "%MOUNTDIR%\Windows\SysWOW64\uxtheme.dll"
    ECHO Modifying "%MOUNTDIR%\Windows\System32\themeservice.dll"
    takeown /a /f "%MOUNTDIR%\Windows\System32\themeservice.dll"
    icacls "%MOUNTDIR%\Windows\System32\themeservice.dll" /Grant Administrators:F
    DEL /Q "%MOUNTDIR%\Windows\System32\themeservice.dll" 
    Copy /Y "%~dp0UxTheme\x64\themeservice.dll" "%MOUNTDIR%\Windows\System32\themeservice.dll"
    ECHO Modifying "%MOUNTDIR%\Windows\System32\themeui.dll"
    takeown /a /f "%MOUNTDIR%\Windows\System32\themeui.dll"
    icacls "%MOUNTDIR%\Windows\System32\themeui.dll" /Grant Administrators:F
    DEL /Q "%MOUNTDIR%\Windows\System32\themeui.dll" 
    Copy /Y "%~dp0UxTheme\x64\themeui.dll" "%MOUNTDIR%\Windows\System32\themeui.dll"
    ECHO Modifying "%MOUNTDIR%\Windows\SysWOW64\themeui.dll"
    takeown /a /f "%MOUNTDIR%\Windows\SysWOW64\themeui.dll"
    icacls "%MOUNTDIR%\Windows\SysWOW64\themeui.dll" /Grant Administrators:F
    DEL /Q "%MOUNTDIR%\Windows\SysWOW64\themeui.dll" 
    Copy /Y "%~dp0UxTheme\x86\themeui.dll" "%MOUNTDIR%\Windows\SysWOW64\themeui.dll"
    
    
    :: For Themes
    ECHO Modifying "Themes folder"
    takeown /a /F "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\classic.theme"
    icacls "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\classic.theme" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\classic.theme"
    takeown /a /F "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hc1.theme"
    icacls "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hc1.theme" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hc1.theme"
    takeown /a /F "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hc2.theme"
    icacls "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hc2.theme" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hc2.theme"
    takeown /a /F "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hcblack.theme"
    icacls "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hcblack.theme" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hcblack.theme"
    takeown /a /F "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hcwhite.theme"
    icacls "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hcwhite.theme" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hcwhite.theme"
    takeown /a /F "%MOUNTDIR%\Windows\Resources\Themes" /r /d y
    icacls "%MOUNTDIR%\Windows\Resources\Themes" /Grant Administrators:F
    RMDIR /S /Q "%MOUNTDIR%\Windows\Resources\Themes"
    xCopy /S /Y "%~dp0Themes" "%MOUNTDIR%\Windows\Resources\Themes"
    
    
    :: For Wallpaper
    ECHO Modifying "Wallpaper folder"
    takeown /a /f "%MOUNTDIR%\Windows\Web\Wallpaper\Architecture" /r /d y
    icacls "%MOUNTDIR%\Windows\Web\Wallpaper\Architecture" /Grant Administrators:F
    RMDIR /S /Q "%MOUNTDIR%\Windows\Web\Wallpaper\Architecture"
    takeown /a /f "%MOUNTDIR%\Windows\Web\Wallpaper\Characters" /r /d y
    icacls "%MOUNTDIR%\Windows\Web\Wallpaper\Characters" /Grant Administrators:F
    RMDIR /S /Q "%MOUNTDIR%\Windows\Web\Wallpaper\Characters"
    takeown /a /f "%MOUNTDIR%\Windows\Web\Wallpaper\Landscapes" /r /d y
    icacls "%MOUNTDIR%\Windows\Web\Wallpaper\Landscapes" /Grant Administrators:F
    RMDIR /S /Q "%MOUNTDIR%\Windows\Web\Wallpaper\Landscapes"
    takeown /a /f "%MOUNTDIR%\Windows\Web\Wallpaper\Nature" /r /d y
    icacls "%MOUNTDIR%\Windows\Web\Wallpaper\Nature" /Grant Administrators:F
    RMDIR /S /Q "%MOUNTDIR%\Windows\Web\Wallpaper\Nature"
    takeown /a /f "%MOUNTDIR%\Windows\Web\Wallpaper\Scenes" /r /d y
    icacls "%MOUNTDIR%\Windows\Web\Wallpaper\Scenes" /Grant Administrators:F
    RMDIR /S /Q "%MOUNTDIR%\Windows\Web\Wallpaper\Scenes"
    xCopy /Y "%~dp0Windows" "%MOUNTDIR%\Windows\Web\Wallpaper\Windows"
    
    
    :: For Screen saver 
    ::ECHO Modifying "Screen saver folder"
    ::takeown /a /f "%MOUNTDIR%\Windows\System32\Mystify.scr" 
    ::icacls "%MOUNTDIR%\Windows\System32\Mystify.scr" /Grant Administrators:F 
    ::DEL /S /Q "%MOUNTDIR%\Windows\System32\Mystify.scr"
    ::takeown /a /f "%MOUNTDIR%\Windows\System32\Ribbons.scr" 
    ::icacls "%MOUNTDIR%\Windows\System32\Mystify.scr" /Grant Administrators:F 
    ::Move /y "%MOUNTDIR%\Windows\System32\Ribbons.scr" "%TRASH%"
    ::takeown /a /f "%MOUNTDIR%\Windows\System32\scrnsave.scr" 
    ::icacls "%MOUNTDIR%\Windows\System32\scrnsave.scr" /Grant Administrators:F 
    ::DEL /S /Q  "%MOUNTDIR%\Windows\System32\scrnsave.scr" 
    ::takeown /a /f "%MOUNTDIR%\Windows\System32\en-US\Mystify.scr.mui" 
    ::icacls "%MOUNTDIR%\Windows\System32\en-US\Mystify.scr.mui" /Grant Administrators:F 
    ::Move /y "%MOUNTDIR%\Windows\System32\en-US\Mystify.scr.mui" "%TRASH%"
    ::takeown /a /f "%MOUNTDIR%\Windows\System32\en-US\Ribbons.scr.mui" 
    ::icacls "%MOUNTDIR%\Windows\System32\en-US\Ribbons.scr.mui" /Grant Administrators:F 
    ::Move /y "%MOUNTDIR%\Windows\System32\en-US\Ribbons.scr.mui" "%TRASH%"
    ::takeown /a /f "%MOUNTDIR%\Windows\System32\en-US\scrnsave.scr.mui" 
    ::icacls "%MOUNTDIR%\Windows\System32\en-US\scrnsave.scr.mui" /Grant Administrators:F 
    ::Move /y "%MOUNTDIR%\Windows\System32\en-US\scrnsave.scr.mui" "%TRASH%"
    ::takeown /a /f "%MOUNTDIR%\Windows\SysWOW64\Mystify.scr" 
    ::icacls "%MOUNTDIR%\Windows\SysWOW64\Mystify.scr" /Grant Administrators:F 
    ::DEL /S /Q  "%MOUNTDIR%\Windows\SysWOW64\Mystify.scr"
    ::takeown /a /f "%MOUNTDIR%\Windows\SysWOW64\Ribbons.scr" 
    ::icacls "%MOUNTDIR%\Windows\SysWOW64\Mystify.scr" /Grant Administrators:F 
    ::Move /y "%MOUNTDIR%\Windows\SysWOW64\Ribbons.scr" "%TRASH2%"
    ::takeown /a /f "%MOUNTDIR%\Windows\SysWOW64\scrnsave.scr" 
    ::icacls "%MOUNTDIR%\Windows\SysWOW64\scrnsave.scr" /Grant Administrators:F 
    ::DEL /S /Q  "%MOUNTDIR%\Windows\SysWOW64\scrnsave.scr"
    ::takeown /a /f "%MOUNTDIR%\Windows\SysWOW64\en-US\Mystify.scr.mui" 
    ::icacls "%MOUNTDIR%\Windows\SysWOW64\en-US\Mystify.scr.mui" /Grant Administrators:F 
    ::Move /y "%MOUNTDIR%\Windows\SysWOW64\en-US\Mystify.scr.mui" "%TRASH2%"
    ::takeown /a /f "%MOUNTDIR%\Windows\SysWOW64\en-US\Ribbons.scr.mui" 
    ::icacls "%MOUNTDIR%\Windows\SysWOW64\en-US\Ribbons.scr.mui" /Grant Administrators:F 
    ::Move /y "%MOUNTDIR%\Windows\SysWOW64\en-US\Ribbons.scr.mui" "%TRASH2%"
    ::takeown /a /f "%MOUNTDIR%\Windows\SysWOW64\en-US\scrnsave.scr.mui" 
    ::icacls "%MOUNTDIR%\Windows\SysWOW64\en-US\scrnsave.scr.mui" /Grant Administrators:F 
    ::Move /y "%MOUNTDIR%\Windows\SysWOW64\en-US\scrnsave.scr.mui" "%TRASH2%"
    ::RMDIR /S /Q "%TRASH%"
    ::RMDIR /S /Q "%TRASH2%"
    ::pause
    
    
    ::::::::::::::;;dell system company logo:::::::::::::::::::::::::
    echo modifying dell system properties company logo
    Copy /Y "%~dp0Apple-Dell-Logo1.bmp" "%MOUNTDIR%\Windows\System32\oobe"
    
    
    echo modifying win logon background
    mkdir "%MOUNTDIR%\Windows\System32\oobe\info\backgrounds"
    Copy /Y "%~dp0backgroundDefault.jpg" "%MOUNTDIR%\Windows\System32\oobe\info\backgrounds"
    
    
    :: This part for windows defender
    ::ECHO Modifying "WINDOWS Defender Folder"
    ::takeown /a /f "%MOUNTDIR%\Program Files\Windows Defender" /r /d y
    ::icacls "%MOUNTDIR%\Program Files\Windows Defender" /Grant Administrators:F
    ::move /y "%MOUNTDIR%\Program Files\Windows Defender" "%TRASH%"
    ::RMDIR /S /Q "%TRASH%\Windows Defender"
    ::takeown /a /f "%MOUNTDIR%\Program Files (x86)\Windows Defender" /r /d y
    ::icacls "%MOUNTDIR%\Program Files (x86)\Windows Defender" /Grant Administrators:F
    ::move /y "%MOUNTDIR%\Program Files (x86)\Windows Defender" "%TRASH%\windefendx86"
    ::RMDIR /S /Q "%TRASH%\windefendx86"
    ::takeown /a /f "%MOUNTDIR%\ProgramData\Microsoft\Windows Defender" /r /d y
    ::icacls "%MOUNTDIR%\ProgramData\Microsoft\Windows Defender" /Grant Administrators:F
    ::move /y "%MOUNTDIR%\ProgramData\Microsoft\Windows Defender" "%TRASH%\windefend"
    ::RMDIR /S /Q "%TRASH%\windefend"
    ::echo windefender folder deletation phasedone 
    ::pause 
    
    
    :: For windows sidebar
    ECHO Modifying "Windows Sidebar"
    takeown /a /f "%MOUNTDIR%\Program Files\Windows Sidebar" /r /d y
    icacls "%MOUNTDIR%\Program Files\Windows Sidebar" /Grant Administrators:F
    move /y "%MOUNTDIR%\Program Files\Windows Sidebar" "%TRASH%"
    RMDIR /S /Q "%TRASH%\Windows Sidebar"
    takeown /a /f "%MOUNTDIR%\Program Files (x86)\Windows Sidebar" /r /d y
    icacls "%MOUNTDIR%\Program Files (x86)\Windows Sidebar" /Grant Administrators:F
    move /y "%MOUNTDIR%\Program Files (x86)\Windows Sidebar" "%TRASH%\sidebarx86"
    RMDIR /S /Q "%TRASH%\sidebarx86"
    
    
    :: Windows DVD Maker
    ::ECHO Modifying "DVD Maker"
    ::takeown /a /f "%MOUNTDIR%\Program Files\DVD Maker" /r /d y
    ::icacls "%MOUNTDIR%\Program Files\DVD Maker" /Grant Administrators:F
    ::move /y "%MOUNTDIR%\Program Files\DVD Maker" "%TRASH%"
    ::RMDIR /S /Q "%TRASH%\DVD Maker"
    ::echo dvd maker folder deletation phase done
    ::pause 
    
    
    :: For Documents folder
    ECHO Modifying "Documents folder"
    takeown /a /f "%MOUNTDIR%\Users\Public" /r /d y
    icacls "%MOUNTDIR%\Users\Public" /Grant Administrators:F
    RMDIR /S /Q "%MOUNTDIR%\Users\Public\Music\Sample Music"
    RMDIR /S /Q "%MOUNTDIR%\Users\Public\Pictures\Sample Pictures"
    RMDIR /S /Q "%MOUNTDIR%\Users\Public\Videos\Sample Videos"
    Copy /Y "%~dp0Documents" "%MOUNTDIR%\Users\Public\Documents"
    
    
    ::For FirstUXRes 
    ECHO Copying %MOUNTDIR%\Windows\System32\oobe\FirstUXRes.wim
    Copy /Y "%MOUNTDIR%\Windows\System32\oobe\FirstUXRes.wim" "%FirstUXRes%\FirstUXRes.wim"
    ECHO Mounting %FirstUXRes%\FirstUXRes.wim  to %SUBMOUNTDIR%
    imagex /mountrw %FirstUXRes%\FirstUXRes.wim 1 %SUBMOUNTDIR%
    ECHO Modifying "%SUBMOUNTDIR%\FirstUXBackground.bmp"
    takeown /a /f "%SUBMOUNTDIR%\FirstUXBackground.bmp"
    icacls "%SUBMOUNTDIR%\FirstUXBackground.bmp" /Grant Administrators:F
    attrib -R %SUBMOUNTDIR%\FirstUXBackground.bmp
    Copy /Y "%~dp0FirstUXBackground.bmp" "%SUBMOUNTDIR%\FirstUXBackground.bmp"
    attrib +R "%SUBMOUNTDIR%\FirstUXBackground.bmp"
    ECHO Finished modifications, unmounting and commiting FirstUXRes.wim
    imagex /unmount /commit %SUBMOUNTDIR%  
    ECHO Modifying "%MOUNTDIR%\Windows\System32\oobe\FirstUXRes.wim"
    takeown /a /f "%MOUNTDIR%\Windows\System32\oobe\FirstUXRes.wim"
    icacls "%MOUNTDIR%\Windows\System32\oobe\FirstUXRes.wim" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\System32\oobe\FirstUXRes.wim"
    Copy /Y "%FirstUXRes%\FirstUXRes.wim" "%MOUNTDIR%\Windows\System32\oobe\FirstUXRes.wim"
    ECHO.
    pause
    ECHO Finished modifications, unmounting and commiting install.wim
    DISM /unmount-wim /mountdir:%MOUNTDIR%  /commit
    ECHO.
    ECHO.
    
    
    :::::::::::::::::::::::::: For Boot.wim index 2::::::::::::::::::::::::::::::::::::::::::::
    ECHO Mounting boot.wim:2 to %MOUNTDIR%
    DISM /mount-wim /wimfile:%DVDSOURCE%\sources\boot.wim /index:2 /mountdir:%MOUNTDIR%
    ECHO Modifying "%MOUNTDIR%\sources\background.bmp"
    takeown /a /f "%MOUNTDIR%\sources\background.bmp"
    icacls "%MOUNTDIR%\sources\background.bmp" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\sources\background.bmp"
    Copy /Y "%~dp0background.bmp" "%MOUNTDIR%\sources\background.bmp"
    ECHO Modifying "%MOUNTDIR%\Windows\System32\setup.bmp"
    TAKEOWN /a /f "%MOUNTDIR%\Windows\System32\setup.bmp"
    icacls "%MOUNTDIR%\Windows\System32\setup.bmp" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\System32\setup.bmp"
    Copy /Y "%~dp0setup.bmp" "%MOUNTDIR%\Windows\System32\setup.bmp"
    ECHO Modifying "%MOUNTDIR%\Windows\System32\winpe.bmp"
    TAKEOWN /a /f "%MOUNTDIR%\Windows\System32\winpe.bmp"
    icacls "%MOUNTDIR%\Windows\System32\winpe.bmp" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\System32\winpe.bmp"
    Copy /Y "%~dp0winpe.bmp" "%MOUNTDIR%\Windows\System32\winpe.bmp"
    ECHO Modifying "%MOUNTDIR%\sources\spwizimg.dll"
    TAKEOWN /a /f "%MOUNTDIR%\sources\spwizimg.dll"
    icacls "%MOUNTDIR%\sources\spwizimg.dll" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\sources\spwizimg.dll"
    Copy /Y "%~dp0spwizimg.dll" "%MOUNTDIR%\sources\spwizimg.dll"
    ECHO Modifying "%MOUNTDIR%\Windows\System32\imageres.dll"
    TAKEOWN /a /f "%MOUNTDIR%\Windows\System32\imageres.dll"
    icacls "%MOUNTDIR%\Windows\System32\imageres.dll" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\System32\imageres.dll"
    Copy /Y "%~dp0imageres.dll" "%MOUNTDIR%\Windows\System32\imageres.dll"
    ECHO Modifying "%MOUNTDIR%\sources\W32UIRes.dll"
    TAKEOWN /a /f "%MOUNTDIR%\sources\W32UIRes.dll"
    icacls "%MOUNTDIR%\sources\W32UIRes.dll" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\sources\W32UIRes.dll"
    Copy /Y "%~dp0W32UIRes.dll" "%MOUNTDIR%\sources\W32UIRes.dll"
    ECHO Modifying "%MOUNTDIR%\Windows\System32\uxtheme.dll"
    TAKEOWN /a /f "%MOUNTDIR%\Windows\System32\uxtheme.dll"
    icacls "%MOUNTDIR%\Windows\System32\uxtheme.dll" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\System32\uxtheme.dll"
    Copy /Y "%~dp0UxTheme\x64\uxtheme.dll" "%MOUNTDIR%\Windows\System32\uxtheme.dll"
    ECHO Finished modifications, unmounting and commiting boot.wim
    DISM /unmount-wim /mountdir:%MOUNTDIR%  /commit
    
    
    :::::::::::::::::::::::::::::::::For DVD source folder:::::::::::::::::::::::::::::::::::::
    ECHO Modifying "%DVDSOURCE%\sources\spwizimg.dll"
    takeown /a /f "%DVDSOURCE%\sources\spwizimg.dll"
    icacls "%DVDSOURCE%\sources\spwizimg.dll" /Grant Administrators:F
    DEL /Q "%DVDSOURCE%\sources\spwizimg.dll"
    Copy /Y "%~dp0spwizimg.dll" "%DVDSOURCE%\sources\spwizimg.dll"
    ECHO Modifying "%DVDSOURCE%\sources\W32UIRes.dll"
    takeown /a /f "%DVDSOURCE%\sources\W32UIRes.dll"
    icacls "%DVDSOURCE%\sources\W32UIRes.dll" /Grant Administrators:F
    DEL /Q "%DVDSOURCE%\sources\W32UIRes.dll"
    Copy /Y "%~dp0W32UIRes.dll" "%DVDSOURCE%\sources\W32UIRes.dll"
    ECHO Modifying "%DVDSOURCE%\sources\en-us\setup.exe.mui"
    takeown /a /f "%DVDSOURCE%\sources\en-us\setup.exe.mui"
    icacls "%DVDSOURCE%\sources\en-us\setup.exe.mui" /Grant Administrators:F
    DEL /Q "%DVDSOURCE%\sources\en-us\setup.exe.mui"
    Copy /Y "%~dp0setup.exe.mui" "%DVDSOURCE%\sources\en-us\setup.exe.mui"
    ECHO Modifying "%DVDSOURCE%\sources\background_cli.bmp"
    takeown /a /f "%DVDSOURCE%\sources\background_cli.bmp"
    icacls "%DVDSOURCE%\sources\background_cli.bmp" /Grant Administrators:F
    DEL /Q "%DVDSOURCE%\sources\background_cli.bmp"
    Copy /Y "%~dp0background_cli.bmp" "%DVDSOURCE%\sources\background_cli.bmp"
    goto :eof
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    :Rt7lite customization
    ECHO Mounting install.wim index:%MOUNTNUM% to %MOUNTDIR%
    DISM /mount-wim /wimfile:%DVDSOURCE%\sources\install.wim /index:%MOUNTNUM% /mountdir:%MOUNTDIR%
    
    
    :: For W32UIRes
    ECHO Modifying "%MOUNTDIR%\Windows\System32\oobe\en-US\W32UIRes.dll.mui"
    TAKEOWN /a /f "%MOUNTDIR%\Windows\System32\oobe\en-US\W32UIRes.dll.mui"
    icacls "%MOUNTDIR%\Windows\System32\oobe\en-US\W32UIRes.dll.mui" /Grant Administrators:F
    Copy /Y "%~dp0W32UIRes.dll.mui" "%MOUNTDIR%\Windows\System32\oobe\en-US\W32UIRes.dll.mui"
    
    
    ::For Basebrd
    ECHO Modifying "%MOUNTDIR%\Windows\Branding\Basebrd\en-US\basebrd.dll.mui"
    takeown /a /f "%MOUNTDIR%\Windows\Branding\Basebrd\en-US\basebrd.dll.mui"
    icacls "%MOUNTDIR%\Windows\Branding\Basebrd\en-US\basebrd.dll.mui" /Grant Administrators:F
    Copy /Y "%~dp0basebrd.dll.mui" "%MOUNTDIR%\Windows\Branding\Basebrd\en-US\basebrd.dll.mui"
    
    
    ::For Notepad
    echo modifying notepad in windows
    takeown /a /f "%MOUNTDIR%\Windows\notepad.exe" 
    icacls "%MOUNTDIR%\Windows\notepad.exe" /Grant Administrators:F
    Copy /Y "%~dp0notepad.exe" "%MOUNTDIR%\Windows\notepad.exe"
    echo modifying notepad in system32
    takeown /a /f "%MOUNTDIR%\Windows\System32\notepad.exe" 
    icacls "%MOUNTDIR%\Windows\System32\notepad.exe" /Grant Administrators:F
    Copy /Y "%~dp0notepad.exe" "%MOUNTDIR%\Windows\System32\notepad.exe"
    echo modifying notepad in SysWOW64
    takeown /a /f "%MOUNTDIR%\Windows\SysWOW64\notepad.exe" 
    icacls "%MOUNTDIR%\Windows\SysWOW64\notepad.exe" /Grant Administrators:F
    Copy /Y "%~dp0notepad.exe" "%MOUNTDIR%\Windows\SysWOW64\notepad.exe"
    Copy /Y "%~dp0notepad.ini" "%MOUNTDIR%\Users\Administrator\AppData\Roaming\notepad.ini"
    
    
    :: For windows shutdown text
    echo modifying windows shutdown text
    takeown /a /f "%MOUNTDIR%\Windows\System32\en-US\wininit.exe.mui" 
    icacls "%MOUNTDIR%\Windows\System32\en-US\wininit.exe.mui" /Grant Administrators:F
    Copy /Y "%~dp0wininit.exe.mui" "%MOUNTDIR%\Windows\System32\en-US\wininit.exe.mui"
    takeown /a /f "%MOUNTDIR%\Windows\SysWOW64\en-US\wininit.exe.mui" 
    icacls "%MOUNTDIR%\Windows\SysWOW64\en-US\wininit.exe.mui" /Grant Administrators:F
    Copy /Y "%~dp0wininit.exe.mui" "%MOUNTDIR%\Windows\SysWOW64\en-US\wininit.exe.mui"
    
    
    :: For windows logon text
    takeown /a /f "%MOUNTDIR%\Windows\System32\en-US\winlogon.exe.mui" 
    icacls "%MOUNTDIR%\Windows\System32\en-US\winlogon.exe.mui" /Grant Administrators:F
    Copy /Y "%~dp0winlogon.exe.mui" "%MOUNTDIR%\Windows\System32\en-US\winlogon.exe.mui"
    
    
    :: For Themes
    ECHO Modifying "Themes folder"
    takeown /a /F "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\classic.theme"
    icacls "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\classic.theme" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\classic.theme"
    takeown /a /F "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hc1.theme"
    icacls "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hc1.theme" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hc1.theme"
    takeown /a /F "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hc2.theme"
    icacls "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hc2.theme" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hc2.theme"
    takeown /a /F "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hcblack.theme"
    icacls "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hcblack.theme" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hcblack.theme"
    takeown /a /F "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hcwhite.theme"
    icacls "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hcwhite.theme" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\Resources\Ease of Access Themes\hcwhite.theme"
    
    
    ::For FirstUXRes 
    ECHO Copying %MOUNTDIR%\Windows\System32\oobe\FirstUXRes.wim
    Copy /Y "%MOUNTDIR%\Windows\System32\oobe\FirstUXRes.wim" "%FirstUXRes%\FirstUXRes.wim"
    ECHO Mounting %FirstUXRes%\FirstUXRes.wim  to %SUBMOUNTDIR%
    imagex /mountrw %FirstUXRes%\FirstUXRes.wim 1 %SUBMOUNTDIR%
    ECHO Modifying "%SUBMOUNTDIR%\FirstUXBackground.bmp"
    takeown /a /f "%SUBMOUNTDIR%\FirstUXBackground.bmp"
    icacls "%SUBMOUNTDIR%\FirstUXBackground.bmp" /Grant Administrators:F
    attrib -R %SUBMOUNTDIR%\FirstUXBackground.bmp
    Copy /Y "%~dp0FirstUXBackground.bmp" "%SUBMOUNTDIR%\FirstUXBackground.bmp"
    attrib +R "%SUBMOUNTDIR%\FirstUXBackground.bmp"
    ECHO Finished modifications, unmounting and commiting FirstUXRes.wim
    imagex /unmount /commit %SUBMOUNTDIR%  
    ECHO Modifying "%MOUNTDIR%\Windows\System32\oobe\FirstUXRes.wim"
    takeown /a /f "%MOUNTDIR%\Windows\System32\oobe\FirstUXRes.wim"
    icacls "%MOUNTDIR%\Windows\System32\oobe\FirstUXRes.wim" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\System32\oobe\FirstUXRes.wim"
    Copy /Y "%FirstUXRes%\FirstUXRes.wim" "%MOUNTDIR%\Windows\System32\oobe\FirstUXRes.wim"
    ECHO.
    ECHO check if everything done ok or not
    ECHO Finished modifications, unmounting and commiting install.wim
    DISM /unmount-wim /mountdir:%MOUNTDIR%  /commit
    ECHO.
    ECHO.
    
    
    :::::::::::::::::::::::::: For Boot.wim index 1::::::::::::::::::::::::::::::::::::::::::::
    ECHO Mounting boot.wim:1 to %MOUNTDIR%
    DISM /mount-wim /wimfile:%DVDSOURCE%\sources\boot.wim /index:1 /mountdir:%MOUNTDIR%
    :: modifying winpe.bmp 
    ECHO Modifying "%MOUNTDIR%\Windows\System32\winpe.bmp"
    TAKEOWN /a /f "%MOUNTDIR%\Windows\System32\winpe.bmp"
    icacls "%MOUNTDIR%\Windows\System32\winpe.bmp" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\System32\winpe.bmp"
    Copy /Y "%~dp0winpe.bmp" "%MOUNTDIR%\Windows\System32\winpe.bmp"
    ::modifying imageres.dll
    ECHO Modifying "%MOUNTDIR%\Windows\System32\imageres.dll"
    TAKEOWN /a /f "%MOUNTDIR%\Windows\System32\imageres.dll"
    icacls "%MOUNTDIR%\Windows\System32\imageres.dll" /Grant Administrators:F
    DEL /S /Q "%MOUNTDIR%\Windows\System32\imageres.dll"
    Copy /Y "%~dp0imageres.dll" "%MOUNTDIR%\Windows\System32\imageres.dll"
    DISM /unmount-wim /mountdir:%MOUNTDIR%  /commit
    
    
    :::::::::::::::::::::::::: For Boot.wim index 2::::::::::::::::::::::::::::::::::::::::::::
    ECHO Mounting boot.wim:2 to %MOUNTDIR%
    DISM /mount-wim /wimfile:%DVDSOURCE%\sources\boot.wim /index:2 /mountdir:%MOUNTDIR%
    ::for w32UIRes
    ECHO Modifying "%MOUNTDIR%\sources\en-US\W32UIRes.dll.mui"
    TAKEOWN /a /f "%MOUNTDIR%\sources\en-US\W32UIRes.dll.mui"
    icacls "%MOUNTDIR%\sources\en-US\W32UIRes.dll.mui" /Grant Administrators:F
    Copy /Y "%~dp0W32UIRes.dll.mui" "%MOUNTDIR%\sources\en-US\W32UIRes.dll.mui"
    ECHO Finished modifications, unmounting and commiting boot.wim
    DISM /unmount-wim /mountdir:%MOUNTDIR%  /commit
    
    
    :::::::::::::::::::::::::::::::::For DVD source folder:::::::::::::::::::::::::::::::::::::
    ECHO Modifying "%DVDSOURCE%\sources\W32UIRes.dll.mui"
    takeown /a /f "%DVDSOURCE%\sources\W32UIRes.dll.mui"
    icacls "%DVDSOURCE%\sources\W32UIRes.dll.mui" /Grant Administrators:F
    DEL /Q  "%DVDSOURCE%\sources\W32UIRes.dll.mui"
    Copy /Y "%~dp0W32UIRes.dll.mui" "%DVDSOURCE%\sources\W32UIRes.dll.mui"
    ECHO Modifying "%DVDSOURCE%\sources\en-us\setup.exe.mui"
    takeown /a /f "%DVDSOURCE%\sources\en-us\setup.exe.mui"
    icacls "%DVDSOURCE%\sources\en-us\setup.exe.mui" /Grant Administrators:F
    DEL /Q "%DVDSOURCE%\sources\en-us\setup.exe.mui"
    Copy /Y "%~dp0setup.exe.mui" "%DVDSOURCE%\sources\en-us\setup.exe.mui"
    
    
    
    
    
    
    :Finish
    ECHO "Copying $OEM$ files to sources "
    xCopy /S /i /Y "%~dp0scripts" "%DVDSOURCE%\sources\$OEM$\$$\setup\scripts"
    ECHO.
    ECHO Cleaning up...
    RMDIR /S /Q %FirstUXRes%
    RMDIR /S /Q %MOUNTDIR%
    RMDIR /S /Q %SUBMOUNTDIR%
    RMDIR /S /Q %TRASH%
    Echo "Making ISO file"
    IF EXIST "%STORE2%" RMDIR /s /Q "%STORE2%"
    mkdir "%STORE2%"
    Echo Check if all commands executed sucessfully
    oscdimg -bC:\7MSDN\efi\microsoft\boot\efisys.bin -pEF -m -u2 -udfver102 -bootdata:2#p0,e,bC:\7MSDN\boot\etfsboot.com#pEF,e,bC:\7MSDN\efi\microsoft\boot\efisys.bin -lWin7DVD C:\7MSDN\ %STORE2%\7Ultaug.iso
    pause
    ECHO Finished.
    Exit
    
    %%%%%%%%%%%%%%Start of rt7lite protocol %%%%%%%%%%%%%%%%%%

    select windows7 verion.
    select tasks.

    1st go to customization and delete all gadgets.then start from beginning <----------===============VERY VERY IMPORTANT
    ^-
    VERY VERY IMPORTANT

    in default features
    ===========================
    #Games uncheck chess titans ,internet games,more games,purble place,shanghai
    #media features uncheck all
    #windows sidebar and gadgets unchek it

    In permanently remove feature
    ===========================
    Accessories
    ***********
    #accessibility
    #games :- chess titans ,mahjong,more games ,multi player,purble place
    #infrared file transfer
    #speech support
    #welcome center
    #windows sidebar

    Drivers
    ***************
    don't touch any thing

    Language packs
    *****************
    check everything except Japanese removed it here bcoz, am not using office 2010)

    Multimedia
    *************
    #auto play
    #sample music and videos
    #sample picture
    #windows dvd maker
    #windows iso burn
    #windows media center
    #windows media player
    #windows wallpapers

    Services
    ************
    #Windows Backup #####################
    #Windows defender
    #windows error reporting service
    #Windows Media Center receiever Service ##############################
    #Windows Media scheduler Service ##############################
    #Media Player Network Sharing##########################

    System
    ************
    Windows Easy Transfer

    Tweaks
    ================
    controlpanel
    ***************
    [Control Panel Remove]

    [Control Panel Add]

    Control panel view=Large icon

    [Desktop]
    ***********
    [Desktop Taskbar]

    [Explorer Shortcuts]
    *************************

    [Explorer Context]

    [explorer display view]
    show hidden files and folder -enable

    [Security]
    ***************
    Anti spyware=Default
    UAC=Default
    Windows Firewall=Default

    [Services]
    **************
    remote registry -disable

    [System]
    ***********
    Auto Restart in the event of BSOD=enable
    UXTheme patch=Enable
    Get rid of splash windows mail=Enable
    Faster Browsing With Internet Explorer=Enable
    Hibernation=Disable
    Low disk space warning=Disable

    [Visual Effects]
    ***********************

    [Internet Explorer]
    **************************
    Default Search Page=
    Save Session History and Exit=Disable
    Block popups=Enable
    Default Start Page=Custom...

    [Media Center]

    CustomReg=
    CustomBat=

    [Un-Attended]
    ===========================
    Skip product key=True
    Skip Auto Activation=True
    Accept EULA=true
    Setup Language=en-US

    ==================don't use these===================
    Computer name = Denver ,Raptor (Don't use any special character) [very important u can use any special character for user name during installation user creation ]
    organization=Mech ,Home

    account creation [normally dont make any account ,it will only create deafault autologon acccount]
    :::::::::::::::::::
    If want to create only "administrator" account and autologon then check skip user creation and keep auto logon to minimum 10 (upto -9999){dont check add user }

    If want to create user account with admin access and autologon then don't check skip user creation . add user name and pass with admin status.
    do not check unmaskpassword.
    ========================don't use these==============================

    manufacturer=Dell
    Support Hours=24/7
    Support Phone=18004254026
    Support URL=
    Model=N4010
    Logo=D:\7customizer\pix for res hack & rt7Lite\Apple-Dell-Logo1.bmp

    OOBE
    **************
    Network location=Home
    Protect your computer=Default

    Regional
    **************
    Specify=True
    Keyboard=United States
    Currency and date format=English (India)
    Timezone=(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi
    UI Language=en-US

    Customization
    =====================

    [Screen Saver]
    ***********
    C:\Users\ranjan\AppData\Local\Temp\RT_Mount\Window s\System32\Bubbles.scr(Already installed)=0.86
    C:\Users\ranjan\AppData\Local\Temp\RT_Mount\Window s\System32\PhotoScreensaver.scr(Already installed)=0.46
    C:\Users\ranjan\AppData\Local\Temp\RT_Mount\Window s\System32\ssText3d.scr(Already installed)=0.32

    set bubble as default screen saver

    [Themes]
    **************
    C:\Users\Administrator\AppData\Local\Temp\RT_Mount \Windows\Resources\Themes\aero.theme(Already installed)=
    D:\7customizer\Theme\Royale Aero\Royale Aero.theme=
    D:\7customizer\Theme\AeroVG Se7en RTM\AeroVG Se7en RTM.theme=

    Theme frame=Sky
    T_Set as default=C:\Users\Administrator\AppData\Local\Temp\ RT_Mount\Windows\Resources\Themes\aero.theme(Alrea dy installed)

    [WallPaper]
    *********************
    Wallpaper position=Fill

    ADD wallapers

    W_Set as default=D:\7customizer\wallpapers\Hayden Panettiere Wide.jpg

    [LOGON Screen]
    **********************
    Default logon screen=D:\7customizer\wallpapers\emma-roberts-3915-1366x768.jpg

    [Documents]
    *******************************
    your docs

    [Sample Musics]

    [Sound]
    Windows Balloon=Default=
    Windows Battery Critical=Default=
    Windows Battery Low=Default=
    Windows Critical Stop=Default=
    Windows Default=Default=
    Windows Ding=Default=
    Windows Error=Default=
    Windows Exclamation=Default=
    Windows Feed Discovered=Default=
    Windows Hardware Fail=Default=
    Windows Hardware Insert=Default=
    Windows Hardware Remove=Default=
    Windows Information Bar=Default=
    Windows Logoff Sound=Default=
    Windows Logon Sound=Default=
    Windows Minimize=Default=
    Windows Notify=Default=
    Windows Recycle=Default=
    Windows Restore=Default=
    Windows Shutdown=Default=
    Windows Startup=Default=

    AppInstallationMode=0
    DriverForceIntegration=False


    Setupbg=D:\7customizer\edited spwizimg.dll\spwizimg.dll
    SetupBMP=D:\7customizer\pix for res hack & rt7Lite\background_cli.bmp

    ############################
    build current image only
    ############################
    All these below steps are done in my and batCommand scriptch file steps
    again mount install.wim with WAIK then
    1)delete allblack white theme.
    2) replace basebrd.dll.mui , ,W32UIRes.dll.mui ,wininit.exe.mui,winlogon.exe.mui
    3) noteapad.exe in system32 and commit and unmount.
    4)mount boot.wim change W32UIRes.dll.mui
    5)$OEM$ folder - copy necessary files to "$oem$" folder and move that to "source" folder in windows 7 setup folder.

    Use Rt7lite to build "ISO" or bootable USB OR Use Win Setup_1_0_beta8 to make multiboot USB.


    FYI here is the setupcomplete.cmd file made in notepad and saved as setupcomplete.cmd
    Code:
    @ECHO OFF
    %~dp0"yourprogram.exe" /silent 
    cd %~dp0
    attrib -r -a -s -h *.*
    SHUTDOWN /R /T 5
    RMDIR /S /Q "C:\Windows\Setup\Scripts"
    exit
    ======================= END of rt7lite protocol========================

    For 2nd Command script change option in the main script


    welcome to any suggestion
     

    Attached Files:

  2. s1ave77

    s1ave77 MDL Guide Dog/Dev

    Aug 15, 2012
    14,697
    18,939
    340
    #2 s1ave77, Aug 29, 2014
    Last edited by a moderator: Apr 29, 2017
    #1. Sharing knowledge is always appreciated :good3:.

    #2. To share scripts it's nessessary to put them into [code=rich][/code] tags, the '#' icon in post editor. That prevents the code from being formatted by forums software due to window size or anything else.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. urie

    urie Moderator
    Staff Member

    May 21, 2007
    8,696
    3,047
    300
    Thanks for your contribution, but with regards to RTLite it is dead and not supported any more and never was on this forum.
     
  4. monyzoom

    monyzoom MDL Novice

    Oct 6, 2013
    10
    1
    0
    I don't know,may be .But it works very fine with me in this method till date.And i think u should also give it try .
     
  5. zahnoo

    zahnoo MDL Senior Member

    Feb 2, 2011
    387
    35
    10
    I do know and urie is dead right. It's dead because it was such a poor program. I tried it for several months and in fact got it to do exactly what I wanted. But it was tedious, cumbersome, confusing, very slow and their website's support was pathetic at best.

    If it's your cup of tea ... have at it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. hidden jtk

    hidden jtk MDL Novice

    Sep 15, 2014
    6
    1
    0
    Isn't RT7Lite dead? I have been trying to get on the website for days, it's not available. I just use Windows Update Downloader (I can't post URL yet :(: windowsupdatesdownloader dot com then use dism to slipstream my stuffs. Sure it's command line, but not that complicated.
     
  7. Kamrul08

    Kamrul08 MDL Member

    Dec 28, 2013
    101
    12
    10
    Nice Post. Thanks.