Ventoy Forums

Full Version: Inject files into windows
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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\$OEM$\$1\Users\Public\Desktop

My ventoy.json is like this 

    "injection": [
            "image": "/ISO/Windows/Win10_2004_French_x64.iso",
            "archive": "/ventoy/"

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

Any ideas ?

In the setup screen, press Shift+F10 to launch cmd.exe and  type  X:\windows\System32\ventoy.log
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/
[2020/08/19 14:03:42.988] DecompressInjectionArchive D:/ventoy/
[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/>
[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 ?
I just tried to remove spaces in the filename, but it's not better

it tried to make the path shorter :\sources\$OEM$\$1\myfile.ps1 and still no luck
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/

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\Users\Public\Desktop
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 ( )

Maybe i'm missing something in my autoinstall file, i'll keep digging
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.
Got it !

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