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

#451 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 02 February 2009 - 10:00 PM

Here is the last (i guess nobody tests or understands what i am doing)

Hi Lancelot,

I understood what you were doing, which is why I adjusted the batch for use also at %temp% drive letter.

Note: your [LODR] contains an error:
Hardcoding=Yes

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

Is my batch not working for you? My initial thought is just that it is a more simple batch that hopefully others can base further LODR-packs on.

Regards,
Galapo.

#452 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 02 February 2009 - 10:05 PM

Galapo - your batch worked fine for me - it was much faster than Lancelots one.

I just noticed something interesting.
I made an installrite-kit for nmap with Zenmap-GUI on MOA.
Then I launched the kit on a LiveXP and it worked.

Is anybody interested in checking this on his build ?

If this works in more cases it is very easy to handle - no registry editing is required at all - the installrite package automatically adjusts.

#453 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 02 February 2009 - 10:05 PM

start SetResolution.exe -rebuild
Lancelot, maybe better to use this commandline:
start SetResolution.exe -rebuild -exit
Regards,
Galapo.

#454 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 02 February 2009 - 10:06 PM

the installrite package automatically adjusts.

Do you know how it does that?

Yes, post a link so we can test.

Thanks,
Galapo.

#455 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 02 February 2009 - 10:26 PM

Posted Image

Look at that screen - the right column shows the paths I used - the left column shows the paths - sure that is the wrong name ? - that will be used when applying the patch.

Get nmap from here - http://traumfarben.o...dr-test-Nmap.7z

In the LiveXP I tested one files was missing - please add it manually if you do not have it: npptools.dll - put in system32.

How to test: extract the archive anywhere - run the 4-liner batch "lodr-nmap.cmd"
This is very primitive batch - its all about testing the installrite-kit.
It first installs winpcap - then vcredist_x86 - then it will run the installrite-kit.

I am very curious if that will work ???

Ah yes - start network before testing

#456 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 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 - 10:34 PM

Is my batch not working for you?

it failed somwhere, if i remember right, in case of createiso it failed.

I adjusted the batch for use also at %temp% drive letter.

i will add "%temp% drive letter" to wimlodrcheck.cmd later :cheers:.

My initial thought is just that it is a more simple batch that hopefully others can base further LODR-packs on.

mine too, :cheers:, funny i just make it ready.

idea is simple, 2 batch file, 1 main file for utility, 1 common for lodr packs.
IZArc____Manuel23.cmd
+
wimlodrcheck.cmd


here it is, just doubleclick IZArc____Manuel23.cmd, it will work nicely.
http://lancelot.winb...ODR packs23.rar

also with deep burner, virtual box etc. same wimlodrcheck.cmd will be used.

I hope you get the idea.


Galapo - your batch worked fine for me - it was much faster than Lancelots one.

:cheers: Some reasons,
1) i check many possibilities for successfully mounting and starting
ex: now we have bootsdi method with fat32 too, no problem for my current izarc (in other words booting with fat32 .img file)
ex: system write check for lodr packs that have to install things to current system ex: "It first installs winpcap - then vcredist_x86 - then it will run the installrite-kit."
2) two of the steps one of which using replace needs improvements.


in fact, if we all agree using B:\Programw or B:\ProgramLODR or ..... as default mounting root, life would be easier for lodr.


ps: i will check nmap tomorrow, good night for now B)

#457 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 02 February 2009 - 10:39 PM

ex: now we have bootsdi method with fat32 too


Interesting - why would someone want to use fat32 when NTFS is possible ? - just curious ...

#458 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 02 February 2009 - 10:43 PM

Results in smaller image. Has drawbacks of cause, but may be useful to some who don't require ntfs.

http://www.boot-land...?...ost&p=57705

Regards,
Galapo.

#459 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 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 - 10:51 PM

sanbarrow

People have many reasons for changing their settings like you using R:\Programs, having lodr pack rules that makes it work on many conditions with many PE is i guess good.
So a bartpe, livexp, sherpyaxpe, moa pe user with different settings (bootimg with ntfs, wimpack combinations, create iso etc......) can easly use lodr packages with easly acceptable requirements (for now at least having writable ntfs ramdrive, i have an idea for not having this situation too, all need time to add wimlodrcheck.cmd )

#460 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 02 February 2009 - 11:05 PM

just thinking ....

would a flag in registry be able to speed up your environment checks ? - lets say we create a key LODR-options and have a few values predefined ...
0 = every location is uncompressed NTFS
...
...
4 = no space in systemroot - ramdrive with compressed NTFS - programfiles not writeable

Don't know if that would be doable ...

#461 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 02 February 2009 - 11:13 PM

Don't know if that would be doable ...

Yes, that would be possible. The LODR-loader could set the appriate value(s) at boot.

Regards,
Galapo.

#462 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 02 February 2009 - 11:23 PM

The LODR-loader could set the appriate value(s) at boot.


Good idea - I thought about setting that flag at build-time but doing that at boot is much better.

Well - I think best case scenario would be:
files are already in place, systemroot is writeable ntfs

worst case scenario would be:
systemroot not writeable , programfiles not writeable, ramdrive NTFS compressed

what do we have in the middle ?

#463 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 02 February 2009 - 11:48 PM

I've been testing and I don't think compressed ntfs is an issue.

Maybe we can set HKLM\Software\LODR\Environment?

SystemRoot = [ntfs],[writable],[unwritable]
ProgramFiles = [ntfs],[writable],[unwritable]
temp = [ntfs],[writable],[unwritable]

If ntfs, it is assumed location is writable. If writable, it is assumed location is something other than ntfs.

Regards,
Galapo.

#464 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 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 - 11:51 PM

i already put many scenario(s) in wimlodrcheck.cmd to be used later with the main cmd

put a pause in wimlodrcheck.cmd and double click IZArc____Manuel23.cmd

ECHO wjmf --------------------- %wjmf%
ECHO wjmfex ------------------- %wjmfex%
@echo on
pause
Start /MIN .\"%sfxfilename%"


for best scenerio you descibed
ntfscheckProgramfiles=YES

for worst scenerio, i have an adding, lodr packs folder not writable
writablecheckCD=
writablecheckprogramfiles=
(CD refers current directory)

but even with worst scenorio izarc, deepburner works, but some other lodr packs wont work (ex wmare). it depends on the lodr package.


i guess my next step will be making wimlodrcheck.cmd write some results to registry (hklm\software\wimlodrcheckresults). So with 2nd usage with another lod pack, it wont make all tests again and simply mounts and starts :cheers:

#465 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 02 February 2009 - 11:54 PM

Makes perfect sense - should we add
profilesdir = [ntfs],[writable],[unwritable]
?

#466 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 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 - 11:56 PM

:cheers: reg idea already written when i am writing previous post :cheers:


i fully support the reg idea and using [ntfs],[writable],[unwritable] :cheers: B) :cheers:

#467 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 03 February 2009 - 12:07 AM

:cheers: sounds good

Hey - I got some LODRpacks that need dotnet2 or Java

any better ideas than
if not exist %systemroot%\Microsoft.net\Framework\v2.0.50727 exit

and
if not exist %programfiles\java exit

#468 amalux

amalux

    Platinum Member

  • Tutorial Writer
  • 2813 posts
  •  
    United States

Posted 03 February 2009 - 12:15 AM

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.

This works well for me and allows easy access to all my portables on hdd or ufd, also works great for lodr pkgs, thanks again :cheers:
portappstray.JPG

Just one question, how do I put the scuts in the regular Start - Programs instead of separate like this? Also, shortcuts to Startup folder (auto-start)?
stmenu.JPG

#469 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 03 February 2009 - 12:19 AM

Makes perfect sense - should we add
profilesdir = [ntfs],[writable],[unwritable]
?

Yes, good idea.

I'm developing an example batch now.

Regards,
Galapo.

#470 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 03 February 2009 - 12:27 AM

Just one question, how do I put the scuts in the regular Start - Programs instead of separate like this?

Try something like this (dependent upon source language):
start "MyProgram" "%~DP0\MyProgram.exe"

EXIT



[LODR]

Shortcut_number=1

Shortcut1=Programs\System\MyProgram

Shortcut_Parameters1=

Icon1=MyProgram.exe

Also, shortcuts to Startup folder (auto-start)?

Currently not possible to have auto-start upon detection.

Regards,
Galapo.

#471 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 03 February 2009 - 01:01 AM

OK, here's an example for IZArc with dependencies

CALL :checks

CALL :ProgramFiles

IF NOT DEFINED programfilesdir CALL :temp

IF NOT DEFINED programfilesdir EXIT



::===USER LODR BATCH SECTION================================================================



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

rem 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)



:Environment_Dependencies

SET depSystemRoot=unwriteable

SET depProgramFiles=unwriteable

SET depTEMP=ntfs

SET depProfilesDirectory=unwriteable

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





::============================================================================

==============

::	DO NOT MODIFY BELOW HERE!

::============================================================================

==============



:checks

reg.exe query HKLM\SYSTEM\CurrentControlSet\Control\minint >nul 2>&1

if errorlevel 1 exit

IF NOT DEFINED sfx SET sfx=%~DP0

CALL :Environment

CALL :Environment_Dependencies

CALL :Environment_Check

GOTO :EOF



:Environment_Check

IF /i %depSystemRoot%==ntfs (

IF /i %varSystemRoot%==writeable echo LODR app requires ntfs SystemRoot location &PAUSE &EXIT

IF /i %varSystemRoot%==unwriteable echo LODR app requires ntfs SystemRoot location &PAUSE &EXIT

)

IF /i %depSystemRoot%==writeable (

IF /i %varSystemRoot%==unwriteable echo LODR app requires writeable SystemRoot location &PAUSE &EXIT

)



IF /i %depProgramFiles%==ntfs (

IF /i %varProgramFiles%==writeable echo LODR app requires ntfs SystemRoot location &PAUSE &EXIT

IF /i %varProgramFiles%==unwriteable echo LODR app requires ntfs ProgramFiles location &PAUSE &EXIT

)

IF /i %depProgramFiles%==writeable (

IF /i %varProgramFiles%==unwriteable echo LODR app requires writeable ProgramFiles location &PAUSE &EXIT

)



IF /i %depTEMP%==ntfs (

IF /i %varTEMP%==writeable echo LODR app requires ntfs TEMP location &PAUSE &EXIT

IF /i %varTEMP%==unwriteable echo LODR app requires ntfs TEMP location &PAUSE &EXIT

)

IF /i %depTEMP%==writeable (

IF /i %varTEMP%==unwriteable echo LODR app requires writeable TEMP location &PAUSE &EXIT

)



IF /i %depProfilesDirectory%==ntfs (

IF /i %varProfilesDirectory%==writeable echo LODR app requires ntfs ProfilesDirectory location &PAUSE &EXIT

IF /i %varProfilesDirectory%==unwriteable echo LODR app requires ntfs ProfilesDirectory location &PAUSE &EXIT

)

IF /i %depProfilesDirectory%==writeable (

IF /i %varProfilesDirectory%==unwriteable echo LODR app requires writeable ProfilesDirectory location &PAUSE &EXIT

)

GOTO :EOF



:Environment

SET varSystemRoot=unwriteable

SET varProgramFiles=unwriteable

SET varTEMP=unwriteable

SET varProfilesDirectory=unwriteable

FOR /F "tokens=2* delims=	 " %%A IN ('REG QUERY "HKLM\SOFTWARE\LODR\Environment" /v SystemRoot') DO SET varSystemRoot=%%B

FOR /F "tokens=2* delims=	 " %%A IN ('REG QUERY "HKLM\SOFTWARE\LODR\Environment" /v ProgramFiles') DO SET varProgramFiles=%%B

FOR /F "tokens=2* delims=	 " %%A IN ('REG QUERY "HKLM\SOFTWARE\LODR\Environment" /v TEMP') DO SET varTEMP=%%B

FOR /F "tokens=2* delims=	 " %%A IN ('REG QUERY "HKLM\SOFTWARE\LODR\Environment" /v ProfilesDirectory') DO SET varProfilesDirectory=%%B

GOTO :EOF



:ProgramFiles

SET vname=""

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

SET vname=""

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

Clear section where example an be adjusted for other packs.

Regards,
Galapo.

#472 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 03 February 2009 - 06:08 AM

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

New IZArc LODR-pack here.

IZArc batch now uses the one posted above. Able to run on system without BootSDI or FBWF so long as %temp% exists on ntfs drive.

@Ulli
I've uploaded a completely new script to the LiveXP server -- ProgramFilesPE. You're able to set %ProgramFiles% to be on the same drive as %temp%. 'x:\Program Files' etc. is junctioned back to 'b:\Program Files' etc. Compatible now with WimPack ... which reminds me, I must upload a new WimPack version as well.

Regards,
Galapo.

#473 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 03 February 2009 - 06:15 AM

Ulli, Nmap fails for me with attached error.

Attached File  zenmap.rar   447bytes   455 downloads

Regards,
Galapo.

#474 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 03 February 2009 - 06:42 AM

Try something like this (dependent upon source language):

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

EXIT



[LODR]

Shortcut_number=1

Shortcut1=Programs\System\MyProgram

Shortcut_Parameters1=

Icon1=MyProgram.exe


Sorry, that won't work. What you need to do is on the script interface startmenu shortcut box enter something like: 'Programs\LODR'.

Regards,
Galapo.

#475 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 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 03 February 2009 - 10:27 AM

@Galapo

having variables in registry is nice :cheers:

i have some addings etc to current:
** I guess we all agree to try to mount first:"%programfiles%" 2nd: "%temp% drive", what about a 3rd "manueldriveletter" (we can put it in script box) . Profiles and %temp% can be in %systemdrive% with fbwf or bootsdi. Also a 4th drive letter in au3 code as "B:" (because it is the most used) (ps: when script not used, script box empty so 3rd will fail going forward to 4th)

** why having this check for PE environment under "DO NOT MODIFY BELOW HERE!"
::================================

::	DO NOT MODIFY BELOW HERE!

::================================



:checks

reg.exe query HKLM\SYSTEM\CurrentControlSet\Control\minint >nul 2>&1

if errorlevel 1 exit
some lodr packs can easly work with all environment as a portable application. In IZArc____Manuel23.cmd (not in wimlodrcheck.cmd) That is the reason i used
IF NOT "%testconfirminpe%" == "YES" exit

i guess this key is good B).
Software\Lodr\Environment\PEenvironment,[YES],[NO] :cheers:

** As i described situation before having ntfs is not enough, also it should be mountable, For that reason i put ":wimmountmountablecheckProgramfiles" in wimlodrcheck.cmd (there probably be a better method :cheers: )

i guess this is better:
[wimmountable],[ntfs],[writable],[unwritable]

**
Also having checks for current directory (CD) for some lodr pack is important, that is why i assigned these in wimlodrcheck.cmd
%ntfscheckCD%
%writablecheckCD%

**
why using "Programs" folder when %programfiles% is not available.
More classy to use the "Programfiles name", that is why i assigned this in wimlodrcheck.cmd
%Programfilesfoldername%

**
also better to have a "programfiles name" at hand for in case situations, to be unique i choose Programw in wimlodrcheck.cmd
if "%Programfilesfoldername%" == "" set Programfilesfoldername=Programw


ps: please make "pause" descibed at post 464




** in LODR-loader.script better to have
"LODR packs\LODR.tag" instead of "LODR-packs\LODR.tag"
so people who start to prepare lodr packs will be aware of common mistakes with spaced folder and fix.

** in LODR-loader.script can we have a shortcut option besides runonce.

ps: also a minor cosmetics for wimpack for future release:
pCheckBox3="Pack 'Program Files' folder:",1,3,237,43,147,18,True
to
pCheckBox3="Pack 'Program Files' folder:",1,3,237,43,150,18,True




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users