SmartVersion | Tools + Scripts

Discussion in 'Application Software' started by LostED, Apr 15, 2019.

  1. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,425
    11,720
    240
    #541 murphy78, Nov 17, 2024
    Last edited: Nov 17, 2024
    Haha, was I really the guy who made that? My memory is terrible. Unfortunately the links are not working anymore. Does anyone have it or something similar?

    Edit: hmm... I did post the source code. I might be able to recreate it.
     
  2. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,425
    11,720
    240
  3. Sajjo

    Sajjo MDL Member

    Feb 6, 2018
    2,514
    3,603
    90
    There is a few bugs to address SVFtoSFX_400_x86.exe
    1 - Purely aesthetic, check sums could be presented in a more standarized output, like, b34a9037 *en_winme_110_select.iso and so on.
    Code:
    Decoding...
    
    Can't find source file:
    
    en_winme_110_select.iso
    
    b34a9037 = CRC-32
    2d3c96d9527b1c64bcefab01ad621d658e816747 = SHA1
    
    Press any key to continue . . .
    
    2 - Whitespace is not working well.
    3 - Today you have to execute SVFtoSFX in same folder as *.svf, it's all or nothing.
    A drag and drop single/multiple files on to tool and only repack those selected could be handy?
    That would open possibility to utilize a right-click shortcut.

    Maybe others have more bugs to post, I dunno how widely this tool would be used.
     
  4. Sajjo

    Sajjo MDL Member

    Feb 6, 2018
    2,514
    3,603
    90
    For starter (I just had a quick look)
    Line 51 - Missing punctuation mark <Period>
    Code:
    echo ExecuteParameters="x \"%%~ni.svf\" -br \"%%%%S\"" >> config.txt
    Added punctuation mark <Period>
    Code:
    echo ExecuteParameters="x \"%%~ni.svf\" -br .\"%%%%S\"" >> config.txt
    Maybe you could upload complete binary (all files included)
     
  5. ChrigiGee

    ChrigiGee MDL Novice

    Oct 20, 2019
    4
    1
    0
    Hi Ho,

    THX, I was not sure if it's ok I send the Data by a link.
    So I'm beginning with the first script.

    EDIT: I not have enough messages to send links.
    after 5 postings i can Edit and send you the Link to the File too.

    The link with the files include script, valid only 7 Days.
    If someone need again, pls, send me feedback.

    Otherwise, this is my beginner work, and special with smerversion.

    Kind regards
    ChrisgiGee

    Code:
    ;!@Install@!UTF-8!
    Progress="no"
    ExecuteFile="SVF2EXE.cmd"
    ExecuteParameters="\"%%S\""
    ;!@InstallEnd@!

    Code:
    7zr.exe a -mx=9 SVF2EXE.7z 7zr.exe 7zSD_W10.sfx SVF2EXE.cmd smv.exe
    copy /b 7zSD_SVF.sfx + config.txt + SVF2EXE.7z +smv.exe SVF2EXE.exe

    Code:
    @echo off
    color 1f
    
    title SVF to SFX creation tool - L0L and murphy78 (Modified by Tong) 2018-03-21
    
    
    dir /b %1\*.svf >NUL 2>NUL
    
    IF %ERRORLEVEL% NEQ 0 (
    echo.
    echo -------------------------------------------------------------------------------
    echo Unable to locate .SVF files in the current directory.
    echo Press any key to exit, or close the window.
    echo -------------------------------------------------------------------------------
    pause>NUL
    EXIT /b)
    
    :CHOICE
    set VERBOSE=0
    echo.
    echo -------------------------------------------------------------------------------
    echo This script will create SFX patches for all SVF files in the current folder.
    echo Option V is for Verbose output.
    echo -------------------------------------------------------------------------------
    choice /c YNV /N /M "Proceed ? (Y/N/V): "
    
    IF %ERRORLEVEL% EQU 2 EXIT /b
    IF %ERRORLEVEL% EQU 3 set VERBOSE=1
    
    FOR %%i IN (%1\*.svf) DO (
    
    echo.
    echo -------------------------------------------------------------------------------
    echo Creating .7z file for %%~ni.svf
    echo -------------------------------------------------------------------------------
    IF %VERBOSE% EQU 0 (
    7zr.exe a -m0=copy "%%~ni.7z" "%%i" "smv.exe" >NUL 2>NUL
    )
    
    IF %VERBOSE% EQU 1 (
    7zr.exe a -m0=copy "%%~ni.7z" "%%i" "smv.exe"
    )
    
    echo.
    echo -------------------------------------------------------------------------------
    echo Creating .exe file for %%~ni.7z
    echo -------------------------------------------------------------------------------
    echo ;!@Install@!UTF-8! > config.txt
    echo InstallPath="%%%%S" >> config.txt
    echo ExecuteFile="smv.exe" >> config.txt
    echo ExecuteParameters="x \"%%~ni.svf\" -br \"%%%%S\"" >> config.txt
    echo Delete="smv.exe" >> config.txt
    echo Delete="%%~ni.svf" >> config.txt
    echo ;!@InstallEnd@! >> config.txt
    
    IF %VERBOSE% EQU 0 (
    copy /b 7zSD_W10.sfx + config.txt + "%%~ni.7z" "%%~dpni.exe" >NUL 2>NUL
    )
    
    IF %VERBOSE% EQU 1 (
    copy /b 7zSD_W10.sfx + config.txt + "%%~ni.7z" "%%~dpni.exe"
    )
    
    echo.
    echo -------------------------------------------------------------------------------
    echo Cleanup the config.txt and %%~ni.7z
    echo -------------------------------------------------------------------------------
    IF %VERBOSE% EQU 0 (
    if exist config.txt del /q /s "config.txt" >NUL 2>NUL
    if exist %%~ni.7z   del /q /s "%%~ni.7z"   >NUL 2>NUL
    )
    
    IF %VERBOSE% EQU 1 (
    if exist config.txt del /q /s "config.txt"
    if exist %%~ni.7z   del /q /s "%%~ni.7z"
    )
    
    )
    
    echo.
    echo -------------------------------------------------------------------------------
    echo Process complete. Press any key to exit.
    echo -------------------------------------------------------------------------------
    pause>NUL
    exit /b
    

     
  6. Sajjo

    Sajjo MDL Member

    Feb 6, 2018
    2,514
    3,603
    90
  7. ChrigiGee

    ChrigiGee MDL Novice

    Oct 20, 2019
    4
    1
    0
  8. Galamooth..

    Galamooth.. MDL Novice

    Sep 1, 2024
    45
    7
    0
    Hi, I would like to know what this tool is for? What could I do with it? Is it difficult to use? Could I include my modifications and configuration of an operating system in an svf file and apply it to another iso for example? Or am I misunderstanding how the tool works?
     
  9. geese howard

    geese howard MDL Member

    Aug 18, 2009
    110
    15
    10
    First post
     
  10. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,425
    11,720
    240
    #557 murphy78, Jan 20, 2025
    Last edited: Jan 20, 2025
    SVF files are for all intents and purposes just delta files that have the ability to also use compression. In my experience, the compression is really unnecessary.
    Basically you could take two different ISO files that are very similar but slightly different and create a delta patch using smart version (smv.exe) and the result is a .svf file which is a delta between the source iso and the result iso.
    It is equivalent to using a delta patch but smartversion calls them something else (versions iirc)

    So Hypothetically, if you wanted to modify an OS and just release the modification, what you would do is:
    1) Extract the iso to a directory
    2) mount the index you wanted to modify using dism or similar tool
    3) make the modifications to registry using reg load / unload or dism add package stuff. You could also use win10ui to overhaul the updates but you would want to use the script before mounting if that's the case because I believe it automounts/unmounts.
    4) unmount directory and commit with dism
    5) create new iso
    6) create the svf patch with smv.exe from the original .iso to the new iso you just created. It shouldn't be too much different depending on how much data was changed.

    You want to keep the install.wim and boot.wim formats unchanged. You don't want to change to install.esd, install.swm, or solid format. Anything that dramatically changes the file structure would create a very large delta (svf) file.

    This is my MakePatch.cmd that I use to make svf files:
    Code:
    set smvexec="E:\Apps\SmartVersion\smv.exe"
    set smvname=%~n1_%~n2.svf
    %smvexec% cr %smvname% %1 -sha1
    %smvexec% i %smvname% %2 -rf %1 %2 -br .
    Basic usage is "makepatch somefile.iso secondiso.iso"
    You want to change the location of the smv.exe. In my experience it doesn't matter what version of smv.exe you use. You just have to get one from smartversion 3.00 or above. Just install the program and dig out the smv.exe

    I also want to point out that this code was taken directly from the smartversion website and would have to be modified with quotations if you wanted to use filenames with spaces