Jump to content











Photo
* * * * * 2 votes

Separation of system-core and user-stuff: LODR-packs


  • Please log in to reply
520 replies to this topic

#426 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5,013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 01 February 2009 - 10:04 PM

Galapo

Good

than what should i add to au3 file for that purpose ? (like %1 with batch files)
with giving a line for an example:

currently we have this:
batch
AutoIt3.exe "%sfx%\LODR-reg-IZArc3.81.au3"
au3
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\IZArcRAR\DefaultIcon", "", "REG_EXPAND_SZ", "%SystemDrive%\Program Files\IZArc\Icons\RAR.ico")

how to use that, by guessing what should i add to the beginin of au3 file ?
batch
AutoIt3.exe "%sfx%\LODR-reg-IZArc3.81.au3" "%SystemDrive%\Program Files\IZArc"
au3
.....?missing????.........

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\IZArcRAR\DefaultIcon", "", "REG_EXPAND_SZ", "%getfromcommand%\Icons\RAR.ico")


#427 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 01 February 2009 - 10:08 PM

WimPack.exe is a very clever app by Nikzzzz. With it, you can have a "core" within a "system core". That is, the core which is needed to boot is kept in \system32\. Everything else not needed in \system32\ for boot is placed in a sys32.wim WIM image mounted at early GUI stage. So ram-loading image can be kept very small, even if "system core" is very large.

Regards,
Galapo.

#428 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 01 February 2009 - 10:11 PM

how to use that, by guessing what should i add to the beginin of au3 file ?

Nothing as yet, because the line is already assuming file with correct paths. That is, if patching was necessary, it has already been performed.

So the task is really one for the loader/patcher I think. I'm still thinking about this.

Regards,
Galapo.

#429 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 01 February 2009 - 10:20 PM

WimPack.exe is a very clever app by Nikzzzz. With it, you can have a "core" within a "system core". That is, the core which is needed to boot is kept in \system32\. Everything else not needed in \system32\ for boot is placed in a sys32.wim WIM image mounted at early GUI stage. So ram-loading image can be kept very small, even if "system core" is very large.


Sounds interesting :cheers: - maybe I look at it one day

#430 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5,013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 01 February 2009 - 11:05 PM

So the task is really one for the loader/patcher I think.

:cheers:, well batch file do most job of a loader/patcher does except registry thing. only a tool as descibed above to add registry will make the last touch, than only minor improvements left.

For that kind of tasks i like batch files rather than all in one patchers so i see what is going on all the time and can change/add things easly when time passes. I hope you agree.

#431 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 01 February 2009 - 11:38 PM

For that kind of tasks i like batch files rather than all in one patchers so i see what is going on all the time and can change/add things easly when time passes. I hope you agree.

I agree in principal. In practice, the task is too complex for batch file. I'm incorporating such additional patching option now in LODR-loader.exe. Testing soon, hopefully...

Regards,
Galapo.

#432 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 02 February 2009 - 01:45 AM

OK, new LODR-loader script here. Source-code here.

New IZArc LODR-pack here.

LODR-batch_main-IZArc3.81.cmd
reg.exe query HKLM\SYSTEM\CurrentControlSet\Control\minint >nul 2>&1

if errorlevel 1 exit



IF NOT DEFINED sfx SET sfx=%~DP0



CALL :ProgramFiles

IF NOT DEFINED programfilesdir CALL :temp

IF NOT DEFINED programfilesdir EXIT

GOTO OK



:OK

if not exist "%programfilesdir%\IZArc\IZArc.exe" md "%programfilesdir%\IZArc"

compact /U /I /Q "%programfilesdir%\IZArc"

rem if not exist "%programfilesdir%\IZArc\IZArc.exe" junction "%sfx%\IZArc" "%programfilesdir%\IZArc"

if not exist "%programfilesdir%\IZArc\IZArc.exe" imagex /mount "%sfx%\LODR-archive-IZArc3.81.wim" 1 "%programfilesdir%\IZArc"

if not exist "%programfilesdir%\IZArc\IZArc.exe" exit



IF %programfilesdir%==%ProgramFiles% (

AutoIt3.exe "%sfx%\LODR-reg-IZArc3.81.au3"

start "IZArc" "%ProgramFiles%\IZArc\IZArc.exe"

EXIT

) ELSE (

LODR-loader.exe "%programfilesdir%\IZArc\IZArc.exe" "AutoIt3.exe ""%sfx%\LODR-reg-IZArc3.81.au3""" /patch "%~DP0\%~nx0" "ProgramFiles=%programfilesdir%"

EXIT)



:ProgramFiles

FOR /F "tokens=1 delims= " %%P IN ('fsutil fsinfo volumeinfo %ProgramFiles:~0,3% ^| FIND "NTFS"') DO SET vname=%%P

IF %vname%==File SET programfilesdir=%ProgramFiles%

GOTO :EOF



:temp

FOR /F "tokens=1 delims= " %%P IN ('fsutil fsinfo volumeinfo %TEMP:~0,3% ^| FIND "NTFS"') DO SET vname=%%P

IF %vname%==File SET programfilesdir=%TEMP:~0,2%\Programs

GOTO :EOF



[LODR]

Shortcut_number=1

Shortcut1=File Tasks\Compression\IZArc

Shortcut_Parameters1=

Icon1=LODR-icon-IZArc3.81.ico

RegFiles=LODR-reg-IZArc3.81.au3

Hardcoding=Yes

%ProgramFiles%=X:\Program Files|%SystemDrive%\Program Files

As can be seen, if %ProgramFiles% doesn't reside on ntfs disk, batch is now able to use disk where %temp% is located if it is instead ntfs. Patching of REG files is made to reflect this alternative location.

This means that it is ALWAYS necessary to list REG variables and their encoding in the REG file, whether there be hard-coding or not.

Note this crucial line when mount to %temp% drive letter:
LODR-loader.exe "%programfilesdir%\IZArc\IZArc.exe" "AutoIt3.exe ""%sfx%\LODR-reg-IZArc3.81.au3""" /patch "%~DP0\%~nx0" "ProgramFiles=%programfilesdir%"
Syntax is: LODR-loader.exe "program's_exe" "reg_injection_cmdline" /patch "current_batch_file" "variable1=variable_replacement1|variable2=variable_replacement2"

Regards,
Galapo.

#433 amalux

amalux

    Platinum Member

  • Tutorial Writer
  • 2,813 posts
  •  
    United States

Posted 02 February 2009 - 09:30 AM

Wow, this is crazy smart how you've done this, very impressive indeed; who knows, maybe one day I'll be able to figure it out enough to utilize it :cheers: In the meantime, I've got a question which I'm afraid I know the answer to; is it possible to point to an exe (say a portable app on the hdd or on the same media as the PE boots from) and have it show up as a scut in the PE start menu? I know this is what you're doing in a roundabout way with the wim and the au3 and the patcher etc. but isn't there a simpler, more direct way, similar to your IncludeFolder-Shortcut method in bootsdi script? but instead of giving a scut to a folder/directory, recursively scan for any exe and create a scut for each found? This would be an easy solution for including portable programs in a PE wout having them loaded in RAM.

#434 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5,013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 02 February 2009 - 09:51 AM

recursively scan for any exe and create a scut for each found

portable menu of PortableApps.com Menu does that but i dont find it useful when i tested. If i remember right (please test first), copy it to C:\Program Files\ , start the application and ask for recursive scan.

#435 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 02 February 2009 - 09:52 AM

@Amalux
Of course, a program would just have to be written to accomplish the task or find and utilise one that can do it currently.

You just need: a) way to tell the app where and which .exe's you want a shortcut generated for; and b) where and what name to give the shortcut.

To utilise LODR-loader for the same task, you'd need a CMD file located alongside the EXE you want to start and placed somewhere beneath the LODR location specified on the script.

MyProgram.cmd
start "MyProgram" "%~DP0\MyProgram.exe"

EXIT



[LODR]

Shortcut_number=1

Shortcut1=System\MyProgram

Shortcut_Parameters1=

Icon1=MyProgram.exe

Regards,
Galapo.

#436 amalux

amalux

    Platinum Member

  • Tutorial Writer
  • 2,813 posts
  •  
    United States

Posted 02 February 2009 - 10:12 AM

Thanks Galapo, I think this is what I'm looking for :cheers: ; I'll play with it tomorrow, too tired now, must sleep... thanks again B)

#437 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 02 February 2009 - 10:19 AM

@Ulli
I'm currently working on a ProgramFilesPE.script, a replacement for the earlier script I posted were an alternative folder name for %ProgramFiles% could be specified.

Now, it is possible to set %ProgramFiles% to be on the same drive as %temp%. Program directories still located on %SystemDrive% are junctioned back to %ProgramFiles%. Seems to work well. I just have to get this script and WimPack script to be compatible.

Regards,
Galapo.

#438 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 02 February 2009 - 02:51 PM

Wow - sounds good - thanks a lot for looking into it. :cheers:

Ulli

#439 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5,013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 02 February 2009 - 05:39 PM

Here is the last (i guess nobody tests or understands what i am doing) izarc lod pack i modified from galapo's izarc (.cmd, .au3 changed), now it works with create iso (with-without fbwf), bootsdi, bootsdi+wimpack (pack program files individually+together), and probably with other PE (moa, bartpe, ...)

http://lancelot.winb...___Manuel22.rar


Galapo,
i couldnt find out how to do with LODR-loader.exe
so i used this way:

copy "%au3filename%" "%temp%\%au3filename%_Temp"

copy "replacebestcode.exe" "%temp%\replacebestcode.exe"

%temp:~0,2%

cd %temp:~0,2%

cd %temp%

replacebestcode.exe -find "mountedfolder" -replace "%wjmf%" -fname "%au3filename%_Temp"

%sfx:~0,2%

cd %sfx:~0,2%

cd "%sfx%"

AutoIt3.exe "%temp%\%au3filename%_Temp"


#440 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 02 February 2009 - 05:51 PM

Hi Lancelot

just tried it and it failed - where am I supposed to extract the archive to ?

#441 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5,013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 02 February 2009 - 06:39 PM

sanbarrow

anywhere, it is lodr

For livexp: you need to enable LODR-loader.script provided by galapo, this puts all additional things needed to livexp that are required by lodr.

For other Pe: you need to have a working imagex, + fsutil.
also, you need either a wim mountable %ProgramFiles% OR a wimmountable B:\ ramdrive and a writable defined %temp% folder.

#442 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 02 February 2009 - 07:07 PM

Ok - the issues were on my side.

I didn't have autoit3.exe in the path - will change that now.
After editing the batch so that the autoit3.exe is called with full path it worked.
i just got an error at the end of the batch like "setresolution.exe not found"

Can I rem-out that line ? - or is it important to keep it ?

#443 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 02 February 2009 - 07:13 PM

Hmmm - the batch mounts the wim - unmounts it and mounts it again. Is that wanted ?

Can I put a "pause" some where so that I can send you the output ?
Here it seems to try to uncompress every subdir in %temp% - my %temp% was pretty full ....

#444 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5,013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 02 February 2009 - 07:18 PM

new livexp have SetResolution.exe in its system32 folder now.
also autoit3.exe is in system32.exe too
(i havent make a incase needed files folder yet, need time)

Can I rem-out that line ? - or is it important to keep it ?

nope it is not important, but also it wont harm you too.
Simply it makes you sure that registered files (ex: .zip) have the icons shown right.
here is the SetResolution.exe
http://lancelot.winb...tResolution.rar

i wonder how it works with your moa PE ?


try to uncompress every subdir in %temp%

nope this is not the case, i need a better utiltiy for this purpose, currently the text replacer i use scans all files with file name "LODR-reg-IZArc3.81.au3_Temp" in %temp% folder (which cause you see many files listed in %temp%) but only one file found :cheers:.

#445 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5,013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 02 February 2009 - 07:23 PM

Hmmm - the batch mounts the wim - unmounts it and mounts it again. Is that wanted ?

yes, it is check for mountable and is done 1 time.
here is the scenerio it checks:
imagine you mount a myallprogramfiles.wim file to X:\Programs and %programfiles%=X:\Programs
than you cannot mount another wim file to X:\Programs\another
so i put a "mountable check"

#446 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 02 February 2009 - 08:27 PM

imagine you mount a myallprogramfiles.wim file to X:\Programs and %programfiles%=X:\Programs
than you cannot mount another wim file to X:\Programs\another
so i put a "mountable check"


Good point - can't we declare that as forbidden ?
I mean mounting a single wim into %programfiles% ?
That locks everything else out.
In case someone wanted to do that - he could mount the "myallprogramfiles.wim" to lets say %temp%\apps and then junction single dirs in place ...
just thinking loud ....

#447 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5,013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 02 February 2009 - 08:35 PM

Good point - can't we declare that as forbidden ?

no need to

I mean mounting a single wim into %programfiles% ?

it is nice :cheers:

That locks everything else out.

with this payment

In case someone wanted to do that - he could mount the "myallprogramfiles.wim" to lets say %temp%\apps and then junction single dirs in place ...

maybe

mounting myallprogramfiles.wim to %ProgramFiles% is not the only case, also %ProgramFiles% can be in cdfs or fat32(usb), all have same result.
(and remember we try to make lodr as portable as possible)

my batch detects these situations as fast as possible and if %ProgramFiles%\izarc is not mountable it mounts to B:\%ProgramFilesname%\Izarc

how does it work with moa pe? as far as i understand on moa pe you have %programfiles%=R:\Programs so my batch probably mount izarc to R:\Programs\Izarc ??????

#448 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 02 February 2009 - 09:10 PM

Just tried setresolution.exe - seems to do nothing here - do you add any registry for it at build -time ?
Do the CTRL+SHIFT+ arrow-keys work for you ? - thats a nice feature ...

Lancelot - here the wim is mounted to R:\Programs\Izarc so everything is fine.

#449 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5,013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 02 February 2009 - 09:29 PM

Do the CTRL+SHIFT+ arrow-keys work for you ? - thats a nice feature ...

Yes :cheers:

Just tried setresolution.exe - seems to do nothing here - do you add any registry for it at build -time ?

i guess no registry required to startup, with livexp we use some features of setresolution so it is at runonce (not mandatory), as you understand it works hidden and have some extra features :cheers:. (Galapo is the writer of setresolution if you need more details, just look at gui of script to see other features)
for izarc lod i use "SetResolution.exe -rebuild" feature (thanks to galapo),
making test is simple:
put a "new zip file.zip" to desktop before using izarc lodr, probably it is not registered (or registered to sth else due to your build), than use my izarc lodr, registry in au3 will be added but icon remains previous at desktop. "SetResolution.exe -rebuild" line make you have right icon.

here is latest SetResolution.script for livexp that puts setresolution.exe to system32
http://lancelot.winb...tResolution.rar



Lancelot - here the wim is mounted to R:\Programs\Izarc so everything is fine.

Good, nice to have a lodr pack both working with livexp and moa pe :cheers:. As i wrote many times doing some hardcode stuff is NOT necessary B).

#450 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 02 February 2009 - 09:37 PM

:cheers: - oops - setresoltution.exe is working fine - the problem was sitting in front of the screen B)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users