Topic: %PE_Programs% broken  (Read 899 times)

0 Members and 1 Guest are viewing this topic.

%PE_Programs% broken
« on: July 09, 2016, 02:39:10 AM »

JonF

  • Code Baker
  • Chef
  • ***
  • Date Registered: Jan 2011
  • Posts: 286
Actually this is in all projects but my most recent attempt was with Gena.

I've been busy and it's taken some time for me to rewrite all my scripts since unpack disappeared and ExtractAllFiles stopped working. I replaced them with ExtractFile where reasonable.  For scripts with lots of files I packed them into a 7Z and used a chuck of code I stole form some Gena script:

Code: [Select]
If,ExistDir,%ProjectTemp%\TempExtractFolder\%ProgramFolder%,Shellexecute,Hide,cmd.exe,"/C rd /s /q #$q%ProjectTemp%\TempExtractFolder\%ProgramFolder%#$q"
If,ExistDir,%ProjectTemp%\TempExtractFolder\%ProgramFolder%,Call,DirDelete,%ProjectTemp%\TempExtractFolder\%ProgramFolder%
DirMake,%ProjectTemp%\TempExtractFolder\%ProgramFolder%
ExtractFile,%ScriptFile%,%AttachFolder%,%SetupFile%,%ProjectTemp%\TempExtractFolder\%ProgramFolder%
ShellExecute,Hide,%Tools%\7z.exe,"x #$q%ProjectTemp%\TempExtractFolder\%ProgramFolder%\%SetupFile%#$q -y -o#$q%PE_Programs%\%ProgramFolder%#$q"

All the scripts wherein I did that put their files into D:\WinBuilder\%SystemDrive%\GenaPrograms and they do not get packed into the ISO.

I presume it's because %SystemDrive% is bound to #$pSystemDrive#$p\GenaPrograms, not %ystemDrive%\GenaPrograms.

Re: %PE_Programs% broken
« Reply #1 on: July 09, 2016, 03:51:33 AM »

0scar

  • Code Baker
  • Chef
  • ***
  • Date Registered: Jan 2013
  • Posts: 179
This works for me:
 
Code: [Select]
%ProgramTitle%=UltraISO
%ProgramEXE%=UltraISO.exe
%ProgramFolder%=UltraISO
%Program7z%=UltraISO.7z

[process]

//unpack
If,Not,ExistDir,%Target_Prog%\%ProgramFolder%,DirMake,%Target_Prog%\%ProgramFolder%
ExtractAllFiles,%ScriptFile%,Folder,%ProjectTemp%\TempExtractFolder
ShellExecute,hide,%Tools%\7z.exe,"x -y #$q%ProjectTemp%\TempExtractFolder\%Program7z%#$q -o#$q%Target_Prog%\%ProgramFolder%#$q"
If,ExistFile,%ProjectTemp%\TempExtractFolder\%Program7z%,Call,FileDelete,%ProjectTemp%\TempExtractFolder\%Program7z%

[EncodedFolders]
Folder

[EncodedFile-Folder-UltraISO.7z]



Re: %PE_Programs% broken
« Reply #2 on: July 10, 2016, 03:26:06 PM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 1962
Hi JonF,

The %PE_Programs% variable is used for a path that will exist on the booted PE. %Target_Prog% is the variable to use for a path when building the PE.

Regards,
Galapo.

 

Powered by EzPortal