svm.exe command lines

Discussion in 'Scripting' started by tnx, Aug 31, 2021.

  1. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    I usually use this batch file along with svm.exe to extract .svf images

    Code:
    @echo off
    
    
    for /r %%i in (*.svf) do _smv.exe x "%%~nxi" -br .
    
      echo -------------------------------------------------------------------------------
    )
    
    
    
    
    
    
    @echo off
    echo.
    echo.
    echo.
    echo.
    echo.
    echo.
    echo.
    echo ------------FiNiSHED------------
    echo.
    echo.
    echo.
    echo.
    pause
    
    
    thnx @ GezoeSloog
    What i have been trying to do while I was bored is to write a script to extract the image.

    I have
    Code:
    C:\Users\Malcs\Desktop\extract\_smv.exe x C:\Users\Malcs\Desktop\extract\en-gb_windows_10_consumer_editions_version_21h1_updated_aug_2021_x64_dvd_c4331272.svf -br
    but nothing happens.

    Tried all sorts of different ways but getting no results.

    Can anybody give me an example of how to write a command line to extract .svf image files..

    Yes I have
    I want
    cheers
     
  2. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,256
    94,677
    450
  3. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    Thanks for the reply.

    Looked through those links and can't find the info I am after.
    They all seem to be pre built scripts and I don't understand them or know how to extract the script I wish to try.

    I will keep looking.

    cherrs.
     
  4. Sajjo

    Sajjo MDL Member

    Feb 6, 2018
    2,245
    3,258
    90
    @tnx
    You are missing "." at the end, it should look like this:
    Code:
    -br .
     
  5. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    Nice bit of info there... Cheers.

    this
    Code:
    C:\Users\Malcs\Desktop\extract\_smv.exe x C:\Users\Malcs\Desktop\extract\en-gb_windows_10_consumer_editions_version_21h1_updated_aug_2021_x64_dvd_c4331272.svf -br . C:\Users\Malcs\Desktop\extract\en-us_windows_10_consumer_editions_version_21h1_updated_aug_2021_x64_dvd_00b6a9c2.iso
    gives me an error

    Code:
    C:\Windows\system32>C:\Users\Malcs\Desktop\extract\_smv.exe x C:\Users\Malcs\Desktop\extract\en-gb_windows_10_consumer_editions_version_21h1_updated_aug_2021_x64_dvd_c4331272.svf -br . C:\Users\Malcs\Desktop\extract\en-us_windows_10_consumer_editions_version_21h1_updated_aug_2021_x64_dvd_00b6a9c2.iso
    Smartversion 3.7 (c) 2002-2018 G. Vollant - http://www.smartversion.com/ - 32 bits
    error detected: IO Error
    filename : .\en-us_windows_10_consumer_editions_version_21h1_updated_aug_2021_x64_dvd_00b6a9c2.iso
    message : The system cannot find the file specified.
    The file is in the same directory. Just got to figure out how to tell it its there..

    A step closer though..
     
  6. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    dont understand this one..

    Been messing and trying all sorts of different connotations and I finally got one to work and it extracted the chosen .iso image

    Code:
    C:\Users\Malcs\Desktop\extract\_smv.exe x C:\Users\Malcs\Desktop\extract\en-gb_windows_10_consumer_editions_version_21h1_updated_aug_2021_x64_dvd_c4331272.svf -br C:\Users\Malcs\Desktop\extract
    with a funny outcome though. The image is extracted to
    ??????
     
  7. Sajjo

    Sajjo MDL Member

    Feb 6, 2018
    2,245
    3,258
    90
  8. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,331
    7,048
    210
    If you use a batch script running elevated and using relative paths, you should first set the working directory straight away. Insert the line at the start, and the working directory will be changed to the one the script is in.

    Code:
    chdir /d "%~dp0"
     
  9. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    Downloaded those, trying the x64 one

    this
    Code:
    C:\Users\Malcs\Desktop\extract\smv.exe x C:\Users\Malcs\Desktop\extract\en-gb_windows_10_consumer_editions_version_21h1_updated_aug_2021_x64_dvd_c4331272.svf -br .
    gives this

    Code:
    C:\Windows\system32>C:\Users\Malcs\Desktop\extract\smv.exe x C:\Users\Malcs\Desktop\extract\en-gb_windows_10_consumer_editions_version_21h1_updated_aug_2021_x64_dvd_c4331272.svf -br .
    Smartversion 3.82 (c) 2002-2021 G. Vollant - http://www.smartversion.com/ - 64 bits
    error detected: IO Error
    filename : .\en-us_windows_10_consumer_editions_version_21h1_updated_aug_2021_x64_dvd_00b6a9c2.iso
    message : The system cannot find the file specified.
     
  10. Sajjo

    Sajjo MDL Member

    Feb 6, 2018
    2,245
    3,258
    90
    @tnx
    Code:
    cd C:\Users\Malcs\Desktop\extract
    smv.exe x en-gb_windows_10_consumer_editions_version_21h1_updated_aug_2021_x64_dvd_c4331272.svf -br .
    Keep sourec iso in same location, use quotation marks ("") if path/filenames contains whitespace.
    The %~dp0 Variable that @Carlos Detweiller posted is also important if you will make your own script variant.
    What does %~dp0 mean, and how does it work? - Stack Overflow - small intro
     
  11. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    I have put the smv.exe into the Windows dir...


    that worked. Extracted the .iso into the right dir....

    near now...
     
  12. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    Got it.....
    That last bit of code gave me the result

    Code:
    smv.exe x en-gb_windows_10_consumer_editions_version_21h1_updated_aug_2021_x64_dvd_c4331272.svf -br C:\Users\Malcs\Desktop\extract
    I had to put the dir after the -br and not befor the .svf file


    BRILLIANT...

    cheers guys
     
  13. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    mmmmmmmmmmmmmmmm...

    Now its not working....


    very near
     
  14. Sajjo

    Sajjo MDL Member

    Feb 6, 2018
    2,245
    3,258
    90
    #14 Sajjo, Sep 3, 2021
    Last edited: Sep 3, 2021
    @tnx - Example

    smv.exe and *.svf file located at path "E:\!svf_extract"
    03-09-2021 01.33.11.ls.jpg
    source iso for *.svf located at path "D:\!iso_source"
    03-09-2021 01.33.25.ls.jpg

    CMD (notice period mark (.) at end)
    Code:
    cd /d E:\!svf_extract
    smv37.exe x TinyCore-8.1.1.svf -br D:\!iso_source.
    
    *.svf file is now decoded to *.iso at same location as *.svf

    say your source file is located in a new folder at same location - "E:\!svf_extract\!iso_source"
    03-09-2021 02.20.08.ls.jpg

    CMD would look like this - now with 2 period marks (.)
    Code:
    cd /d E:\!svf_extract
    smv37.exe x TinyCore-8.1.1.svf -br .\!iso_source.
     
  15. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    Thanks very much for that info..
     
  16. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    I was wondering why the smv.exe has to be in the same DIR as the .iso and the .svf.

    I had summet in mind to be able to write a script so you could simply right click on a .svf file hand extract the chosen .iso..

    I understand that the base .iso has to be in the same DIR as the .svf but why the smv.exe has to be there puzzles me.
     
  17. Sajjo

    Sajjo MDL Member

    Feb 6, 2018
    2,245
    3,258
    90
    @tnx
    You can try some simple code
    Code:
    @echo off
    if /i not ("%~x1")==(".svf") (echo Only *.svf files is allowed & pause & exit /b)
    set smv=c:\smv.exe
    "%smv%" x "%~1" -br .
    exit /b
    Save as a *.bat file and copy to
    Code:
    %SystemRoot%\explorer.exe shell:sendto
    Copy smv.exe to "C:\" (or anywhere - modify set smv= to reflect that path)

    Now you can right-click a svf file > Send to > your *.bat file
    You can add this to context menu also

    This one relies on that source file is in same location as your svf
    You can use a predefined path to source as shown above

    If you add a "set /p (and path variable - note:not file itself)" and add this variable after -br you can choose individual source by drag and drop
    (last one was flimsy explained but it is possible to have smv.exe, svf and source file in different locations)
    It all depends on that smv.exe knows where all files are or your script redirects properly.
    The easy way is to keep all in same location but a few script instructions can make wonders

    There are more elegant solutions, both cmd and gui, at
    SmartVersion | Tools + Scripts
     
  18. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60

    Some more nice info..
    Thanks very much..
     
  19. Sajjo

    Sajjo MDL Member

    Feb 6, 2018
    2,245
    3,258
    90
    YW, i hope it helps you further.
    :)
     
  20. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    Just been testing it...

    Made the .bat file, put it in the right DIR, put smv.exe into "C:"

    Bobs my uncle. Worked a treat...

    Nice one Sajjo :cool: