Ventoy Forums
Inject files into windows - Printable Version

+- Ventoy Forums (https://forums.ventoy.net)
+-- Forum: Ventoy Plugin (https://forums.ventoy.net/forumdisplay.php?fid=3)
+--- Forum: Ventoy Plugin Forum (https://forums.ventoy.net/forumdisplay.php?fid=4)
+--- Thread: Inject files into windows (/showthread.php?tid=462)



Inject files into windows - Matlox - 08-19-2020

Hello,

I've tried to inject files into windows but they don't show up

I've made an archive like this with a single file in it : sources.zip\sources\$OEM$\$1\Users\Public\Desktop

My ventoy.json is like this 

Code:
    "injection": [
        {
            "image": "/ISO/Windows/Win10_2004_French_x64.iso",
            "archive": "/ventoy/sources.zip"
        }
    ]

I have no errors while installing, but the file isn't dropped in Users\Public\Desktop

Any ideas ?

Thanks


RE: Inject files into windows - longpanda - 08-19-2020

In the setup screen, press Shift+F10 to launch cmd.exe and  type  X:\windows\System32\ventoy.log


RE: Inject files into windows - Matlox - 08-19-2020

Here it is :


Quote:[2020/08/19 14:03:42.895] ######## VentoyJump ##########
[2020/08/19 14:03:42.895] argc = 1 argv[0] = <winpeshl.exe>
[2020/08/19 14:03:42.895] Current directory = <X:\windows\system32>
[2020/08/19 14:03:42.895] ReadWholeFile2Buf <winpeshl.exe>
[2020/08/19 14:03:42.895] Success read file size:162816
[2020/08/19 14:03:42.895] Find os pararm at 128000
[2020/08/19 14:03:42.895] SaveBuffer2File <ventoy\winpeshl.exe> len:33280
[2020/08/19 14:03:42.895] Logical Drives=0x80001c Path:<\ISO\Windows\Win10_2004_French_x64.iso>
[2020/08/19 14:03:42.895] File NOT exist under C:
[2020/08/19 14:03:42.942] File exist under D:
[2020/08/19 14:03:42.942] GetPhyDiskUUID D
[2020/08/19 14:03:42.942] D: is in PhysicalDrive1
[2020/08/19 14:03:42.942] Disk UUID match
[2020/08/19 14:03:42.942] Find ISO file <D:\\ISO\Windows\Win10_2004_French_x64.iso>
[2020/08/19 14:03:42.942] This is Windows 8 or latter...
[2020/08/19 14:03:42.942] VentoyMountISOByAPI <D:\\ISO\Windows\Win10_2004_French_x64.iso>
[2020/08/19 14:03:42.973] OpenVirtualDisk success
[2020/08/19 14:03:42.988] Mount iso by API success
[2020/08/19 14:03:42.988] Mount ISO FILE: SUCCESS
[2020/08/19 14:03:42.988] DeleteVentoyPart2MountPoint Phy1 ...
[2020/08/19 14:03:42.988] File E:\ventoy\ventoy.cpio exist
[2020/08/19 14:03:42.988] LogicalDrive:\\.\E: PhyDrive:1 Offset:123983626240 ExtentLength:33554432
[2020/08/19 14:03:42.988] PhyDisk=1 for E
[2020/08/19 14:03:42.988] Delete ventoy mountpoint: SUCCESS
[2020/08/19 14:03:42.988] auto install no need
[2020/08/19 14:03:42.988] decompress injection archive D:/ventoy/sources.zip...
[2020/08/19 14:03:42.988] DecompressInjectionArchive D:/ventoy/sources.zip
[2020/08/19 14:03:42.988] Read MBR Ret:1 Size:512 code:0
[2020/08/19 14:03:42.988] MBR partition style
[2020/08/19 14:03:42.988] GetVentoyEfiPart StartSector: 242155520
[2020/08/19 14:03:42.988] Parse FAT fs...
[2020/08/19 14:03:42.988] CopyFileFromFatDisk (/ventoy/7z/64/7za.exe)==>(ventoy\7za.exe)
[2020/08/19 14:03:43.145] SaveBuffer2File <ventoy\7za.exe> len:1152000
[2020/08/19 14:03:43.160] extract inject to X:
[2020/08/19 14:03:43.160] cmdline:<ventoy\7za.exe x -y -aoa -oX:\ D:/ventoy/sources.zip>
[2020/08/19 14:03:43.207] Ventoy jump success ...


It seems to be fine.

The file is actually in x:\sources\$OEM$\$1\Users\Public\Desktop

Is there something specific I missed to make it follow from WinPE to Windows 10 ?


RE: Inject files into windows - Matlox - 08-19-2020

I just tried to remove spaces in the filename, but it's not better

it tried to make the path shorter : sources.zip\sources\$OEM$\$1\myfile.ps1 and still no luck


RE: Inject files into windows - longpanda - 08-20-2020

Quote:The file is actually in x:\sources\$OEM$\$1\Users\Public\Desktop

Where do you want the file to be?

Ventoy just run the follow cmd in X:\Windows\System32 directory, and ventoy doesn't care about the directory structure after decompress.

ventoy\7za.exe x -y -aoa -oX:\  D:/ventoy/sources.zip

If this command success, then that's OK.  You can run it in cmd.exe manually.

I wonder if you want the file to be in X:\Users\Public\Desktop ? If so, you should make an archive like    abc.zip\Users\Public\Desktop


RE: Inject files into windows - Matlox - 08-21-2020

but that will make the files in \Users\.... on the installation media, not on the final install.

Putting them in x:\sources\$OEM$\$1\Users\Public\Desktop is the good pratice (https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-vista/cc766228(v=ws.10) )

Maybe i'm missing something in my autoinstall file, i'll keep digging


RE: Inject files into windows - longpanda - 08-21-2020

Ventoy was just designed to inject to the WinPE environment, not the final install.
Ventoy just decompress your archive to the X:\  and that's all.


RE: Inject files into windows - Matlox - 08-21-2020

Got it !

I was hoping someone who had already done it could help me. But I guess i’ll have to search  Tongue