[REPO/HOW-TO/CHAT] Audit/Sysprep/Generalize; Setupcomplete/Firstlogon; Silent Install

Discussion in 'Scripting' started by s1ave77, Feb 11, 2017.

    reg import "path/to/registry.reg"
     
  1. maargueb

    maargueb MDL Member

    Jun 9, 2019
    220
    35
    10
    Is this method correct?
    Winrar and KMS-VL-All-OIA and (theme.reg , tweaks.hklm.reg)

    Code:
    @Echo off
    cd /d "%~dp0"
    REM WinRAR
    "Apps\winrar-x64-601d.exe" /S
    reg import "path/to/registry.reg"
    call %~dp0KMS_VL_ALL_AIO.cmd /s /a
    cd /d "%SystemRoot%\Setup\"
    if exist "%SystemRoot%\Setup\Scripts\" @RD /S /Q "%SystemRoot%\Setup\Scripts\"
    exit /b
     
  2. i answered you what you asked for .
    your coded msg seems wrong & i think you already know everything.
     
  3. maargueb

    maargueb MDL Member

    Jun 9, 2019
    220
    35
    10
    Can you be patient with me?
    Setupcopmlete : Correct or not
     
  4. maargueb

    maargueb MDL Member

    Jun 9, 2019
    220
    35
    10
    #145 maargueb, Jul 3, 2021
    Last edited: Jul 3, 2021
    I make this script (setupcomplete)
    Correct or not

    Code:
    @Echo off
    cd /d "%~dp0"
    REM WinRAR
    "Apps\winrar-x64-601d.exe" /S
    reg import "path/to/registry.reg"
    call "%WinDir%\Setup\Scripts\KMS_VL_ALL.cmd" /s /a
    cd /d "%SystemRoot%\Setup\"
    if exist "%SystemRoot%\Setup\Scripts\" @RD /S /Q "%SystemRoot%\Setup\Scripts\"
    exit /b
     
  5. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,384
    2,037
    210
    How difficult is to test it in a VM?

    Do it, you will have your answer, then you can adjust & test again, till you are happy
     
  6. maargueb

    maargueb MDL Member

    Jun 9, 2019
    220
    35
    10
    I tested the script " setupcomplete "with VM , It works on Windows 10
    Thanks for your help :mml:
    Code:
    @echo off
    regedit /S "%WINDIR%\Setup\Scripts\theme.reg"
    regedit /S "%WINDIR%\Setup\Scripts\tweaks_hklm.reg"
    cd \
    (goto) 2>nul&rd /s /q "%~dp0"
    del /q /f "%0"
    ====================
    I want to add "starIsBak" inside setupcomplete
    Is the code correct or not?
    Code:
    "%windir%\Setup\Apps\startIsBack\StartIsBackCfg.exe"    /install /elevated /silent" /f
     
  7. Elevated = For All users
    Silent = Unattended Install

    i use these both but dont know if /install will have some more function for silent switch.
    plus /f doesnt mean anything as /f i used to Forcefully merge registry key type value data into your system hive.

    command for Silent Install must be :
    StartIsBack++.exe /silent /elevated
     
  8. maargueb

    maargueb MDL Member

    Jun 9, 2019
    220
    35
    10
    #149 maargueb, Jul 4, 2021
    Last edited: Jul 4, 2021
    Is this right?
    $OEM$/$$/setup/scripts/StarIsBak

    Code:
    "%windir%\Setup\scripts\StarIsBak\StartIsBack++.exe" /silent /elevated
     
  9. maargueb

    maargueb MDL Member

    Jun 9, 2019
    220
    35
    10
    last question,
    Is the winrar code correct?

    I want to add winrar
    $OEM$/$$/setup/scripts/Apps

    Code:
    "%windir%\Setup\scripts\Apps\winrar-x64-601d.exe" /S
    
     
  10. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,384
    2,037
    210
    winrar-x64-601d.exe /?


    It should give you an answer.
     
  11. maargueb

    maargueb MDL Member

    Jun 9, 2019
    220
    35
    10
    winrar-x64-601d.exe /S
     
  12. maargueb

    maargueb MDL Member

    Jun 9, 2019
    220
    35
    10
    I want details and information about the registry code:
    assoc.reg

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.001]
    @="7-Zip.001"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.7z]
    @="7-Zip.7z"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.arj]
    @="7-Zip.arj"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.bz2]
    @="7-Zip.bz2"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.bzip2]
    @="7-Zip.bzip2"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.cpio]
    @="7-Zip.cpio"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.deb]
    @="7-Zip.deb"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.dmg]
    @="7-Zip.dmg"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.esd]
    @="7-Zip.z"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.fat]
    @="7-Zip.fat"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.gz]
    @="7-Zip.gz"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.gzip]
    @="7-Zip.gzip"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.hfs]
    @="7-Zip.hfs"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.lha]
    @="7-Zip.lha"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.lzh]
    @="7-Zip.lzh"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.lzma]
    @="7-Zip.lzma"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.ntfs]
    @="7-Zip.ntfs"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.rar]
    @="7-Zip.rar"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.rpm]
    @="7-Zip.rpm"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.squashfs]
    @="7-Zip.squashfs"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.swm]
    @="7-Zip.swm"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.tar]
    @="7-Zip.tar"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.taz]
    @="7-Zip.taz"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.tbz]
    @="7-Zip.tbz"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.tbz2]
    @="7-Zip.tbz2"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.tgz]
    @="7-Zip.tgz"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.tpz]
    @="7-Zip.tpz"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.txz]
    @="7-Zip.txz"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.wim]
    @="7-Zip.wim"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.xar]
    @="7-Zip.xar"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.xz]
    @="7-Zip.xz"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.z]
    @="7-Zip.z"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.001]
    @="001 Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.001\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,9"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.001\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.001\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.001\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.7z]
    @="7z Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.7z\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,0"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.7z\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.7z\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.7z\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.arj]
    @="arj Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.arj\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,4"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.arj\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.arj\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.arj\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.bz2]
    @="bz2 Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.bz2\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,2"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.bz2\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.bz2\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.bz2\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.bzip2]
    @="bzip2 Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.bzip2\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,2"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.bzip2\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.bzip2\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.bzip2\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.cpio]
    @="cpio Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.cpio\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,12"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.cpio\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.cpio\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.cpio\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.deb]
    @="deb Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.deb\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,11"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.deb\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.deb\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.deb\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.dmg]
    @="dmg Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.dmg\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,17"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.dmg\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.dmg\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.dmg\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.esd]
    @="z Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.esd\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,5"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.esd\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.esd\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.esd\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.fat]
    @="fat Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.fat\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,21"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.fat\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.fat\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.fat\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.gz]
    @="gz Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.gz\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,14"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.gz\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.gz\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.gz\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.gzip]
    @="gzip Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.gzip\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,14"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.gzip\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.gzip\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.gzip\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.hfs]
    @="hfs Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.hfs\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,18"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.hfs\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.hfs\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.hfs\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.lha]
    @="lha Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.lha\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,6"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.lha\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.lha\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.lha\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.lzh]
    @="lzh Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.lzh\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,6"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.lzh\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.lzh\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.lzh\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.lzma]
    @="lzma Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.lzma\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,16"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.lzma\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.lzma\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.lzma\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.ntfs]
    @="ntfs Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.ntfs\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,22"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.ntfs\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.ntfs\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.ntfs\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.rar]
    @="rar Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.rar\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,3"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.rar\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.rar\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.rar\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.rpm]
    @="rpm Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.rpm\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,10"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.rpm\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.rpm\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.rpm\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.squashfs]
    @="squashfs Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.squashfs\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,24"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.squashfs\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.squashfs\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.squashfs\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.swm]
    @="swm Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.swm\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,15"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.swm\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.swm\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.swm\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tar]
    @="tar Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tar\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,13"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tar\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tar\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tar\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.taz]
    @="taz Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.taz\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,5"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.taz\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.taz\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.taz\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tbz]
    @="tbz Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tbz\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,2"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tbz\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tbz\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tbz\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tbz2]
    @="tbz2 Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tbz2\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,2"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tbz2\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tbz2\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tbz2\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tgz]
    @="tgz Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tgz\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,14"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tgz\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tgz\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tgz\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tpz]
    @="tpz Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tpz\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,14"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tpz\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tpz\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.tpz\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.txz]
    @="txz Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.txz\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,23"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.txz\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.txz\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.txz\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.wim]
    @="wim Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.wim\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,15"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.wim\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.wim\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.wim\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.xar]
    @="xar Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.xar\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,19"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.xar\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.xar\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.xar\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.xz]
    @="xz Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.xz\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,23"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.xz\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.xz\shell\open]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.xz\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.z]
    @="z Archive"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.z\DefaultIcon]
    @="C:\\Program Files\\7-Zip\\7z.dll,5"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.z\shell]
    @=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.z\shell\open]
    @=""
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\7-Zip.z\shell\open\command]
    @="\"C:\\Program Files\\7-Zip\\7zFM.exe\" \"%1\""
    What is the role of the registry in Windows?
     
  13. migascalp

    migascalp MDL Senior Member

    Sep 18, 2009
    439
    740
    10
    #154 migascalp, Jul 7, 2021
    Last edited: Jul 7, 2021
    basically, save all settings in a single file unlike linux

    You can try this:
    Code:
    SET SC=HKLM\Software\Classes
    SET Extn=001-9 7z-0 arj-4 bz2-2 bzip2-2 cab-7 cpio-7 deb-11 dmg-17 gz-14 fat-21 gz-14 gzip-14 hfs-18 iso-8 lha-6 lzh-6 lzma-16 ntfs-22 rar-3 rpm-10 split-9 squashfs-24 swm-15 tar-13 taz-5 tbz-2 tbz2-2 tgz-14 tpz-14 txz-23 vhd-20 wim-15 xar-19 xz-23 z-5 zip-1
    REM Version 9.20 checked from registry and altered. 1 differences: now cpio-12, removal split-9, addition: gz-14
    SET Extn=001-9 7z-0 arj-4 bz2-2 bzip2-2 cab-7 cpio-12 deb-11 dmg-17 fat-21 gz-14 gzip-14 hfs-18 iso-8 lha-6 lzh-6 lzma-16 ntfs-22 rar-3 rpm-10 squashfs-24 swm-15 tar-13 taz-5 tbz-2 tbz2-2 tgz-14 tpz-14 txz-23 vhd-20 wim-15 xar-19 xz-23 z-5 zip-1
    
    FOR %%j IN (%Extn%) DO (
        FOR /F "tokens=1,2 delims=-" %%A IN ("%%j") DO (
            REG ADD %SC%\.%%A /VE /D "7-Zip.%%A" /F
            REG ADD %SC%\7-Zip.%%A /VE /D "%%A Archive" /F
            REG ADD %SC%\7-Zip.%%A\DefaultIcon /VE /D "%PROGRAMFILES%\7-Zip\7z.dll,%%B" /F
            REG ADD %SC%\7-Zip.%%A\shell\open\command /VE /D "\"%PROGRAMFILES%\7-Zip\7zFM.exe\" \"%%1\"" /F
            )
    )
    
    I've been using this code for a long time. Found somewhere on web

    Edit:
    Found souce
     
  14. maargueb

    maargueb MDL Member

    Jun 9, 2019
    220
    35
    10
    This batch grabs the extension from the space delimited extension list (EXTN=001-9 ... zip-1)
    * <extension>-<standard-icon in 7z.dll> means that the first part is the name of the extension. The second part is the icon, which is stored within the 7z.dll.
    * This data will be used to automatically add the desired values to the registry.
     
  15. maargueb

    maargueb MDL Member

    Jun 9, 2019
    220
    35
    10
    How do I save the file name?
     
  16. ASCI Format

    save as select all scroll down from txt

    anyname.cmd or anyname.bat
     
  17. maargueb

    maargueb MDL Member

    Jun 9, 2019
    220
    35
    10
    I will add the text inside "Setupcomlete"
    It is correct or not

    Code:
    call "%WINDIR%\Setup\scripts\anyname.cmd"
     
  18. "anyname" just an example .

    you can use your choice word instead of "anyname"

    its not mandatory to use only "anyname"
     
  19. nnolex

    nnolex MDL Novice

    Jul 4, 2019
    28
    1
    0
    Is it possible to run an application installation at the end of a Windows installation in the "windowsPE" phase using AutoUnattend?