Jump to content











Photo
- - - - -

[LODR-U] DotNet_2 in 5 ways


  • Please log in to reply
10 replies to this topic

#1 joakim

joakim

    Silver Member

  • Team Reboot
  • 912 posts
  • Location:Bergen
  •  
    Norway

Posted 29 June 2009 - 10:28 AM

Update 22.09.09 for nt7.1 dotnet2_win7rc1_LODR
Update 30.08.09 for nt6.x http://www.mediafire..._vista_LODR.rar

There seems to be information about dotnet for PE spread all over, and lots of opinions about it too. Some of my own post are mostly hidden in other threads, about other stuff. A little summary of it;

The fact is;
- It is BLOAT
- Some good applications depends on it
- It can be added extremely easy to PE and don't necessarily need much free space to be added

The way I see it there's 5 different ways to add dotnet to PE;

1. Junctioning ramloading bootcd with ntfs formatted ramdisk image. Have the files collected and a registry patch. Make junction points from %SystemDrive% and to your externally connected disk where your dotnet2 files are. Does not work with vista and 2k8 sources because of wim format limitations. Requires less space in X:\.

2. Have an Installrite Kit (or similar) for dotnet2 to install. Works with ramloading, FBWF and EWF, and will require anything from 40-80 Mb of free space, depending on how stripped down your dotnet2 is.

3. This is a modification of number 2 that involves splitting the package in two, where the directory Microsoft.NET is placed externally and only the assembly & winsxs directories are located under %SystemRoot%. This only makes sense when NOT dealing with junction points on ntfs formatted X:\. It means that roughly 61 Mb (without much optimization) can be placed outside of X:\. The effect of this is that dotnet2 now is reduced to only 40 Mb uncompressed on the systemdrive.

4. Have a plugin or script that includes dotnet2 at buildtime.

5. Application virtualization like with ThinApp. Will fail to load certain complex applications because of the kernel drivers and system services that it depends on, but thinapped dotnet will work on less complex apps. Requires little space in %temp%.

I have not looked at dotnet 3.5 yet, but guess it's similar in structure to the previous versions.


My LODR dotnet2 package have 3 batches;

3 ways of adding (hotplugging) dotnet2 to a running windows livecd based on xp/2k3.

1. Execute for_ntfs.cmd. Will make junction points inside %SystemRoot% that points to externally located directories. Will only work on ramloading build with ntfs formatted ramdisks. Will copy only 2 Mb into %SystemRoot%.

2. Execute non_ntfs.cmd. Will be the same as an Installrite kit as it copies everything into %SystemRoot%. Will require about 92 Mb of free space on the systemdrive. To be used in companion with File Based Write Filter (FBWF) or Enhanced Write Filter (EWF).

3. Execute split_install.cmd. Copies only the assembly and winsxs directories into %SystemRoot%. Leaves the Microsoft.NET directory out of the systemdrive and therefore only requires 41 Mb of free space on the systemdrive (X:\). The path to the Microsoft.NET directory is currently hardcoded to "C:\LODR\dotnet2\Microsoft.NET" but can tweaked easily. If so, then open the file dotnet2_split.reg and replace the string C:\\LODR\\dotnet2\\Microsoft.NET with what is wanted.

The binaries have been upx'ed and tested, and it works. Confirmed working on LiveXP with 2k3 sources, BartPE with xpsp2 sources, and MOA with 2k3 sources. The complete dotnet2 platform can now be added to PE in a couple of seconds, following the above.

http://www.mediafire...gmk/dotnet2.rar

Joakim

(even though we all hate it, we sometimes can't live without it)

#2 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 30 June 2009 - 08:17 AM

Thanks a lot joakim
:lol:

#3 bilou_gateux

bilou_gateux

    Frequent Member

  • Expert
  • 230 posts
  •  
    France

Posted 13 August 2009 - 05:38 PM

@joakim

dotnet2.reg and dotnet_split.reg registry files should be cleaned. Monitoring a real install on Windows, you have a bunch of unwanted stuff (from Windows installer).
following keys and subkeys:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Features

This key contains many <Package Code> keys. 

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products

This key contains many <Package Code> keys. 

&#91;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer&#93;

&#91;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall&#93;

You can safely remove all this crap. It's only used to modify, repair or remove an installer msi package.

You have also registy entries related to DW20:
&#91;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Microsoft_Event_Reporting_2.0_Temp_Files&#93;

@=&#34;{5A79987F-5D0A-425C-B70D-E49AD5B6BF23}&#34;



&#91;HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{58FC39EB-9DBD-4EA7-B7B4-9404CC6ACFAB}&#93;

key and subkeys

&#91;HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{5A79987F-5D0A-425C-B70D-E49AD5B6BF23}&#93;

keys and subkeys



&#91;HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\EventLog\Application\Microsoft ® Visual C# 2005 Compiler&#93;



&#91;HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\EventLog\Application\.NET Runtime 2.0 Error Reporting&#93;



&#91;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting\DW\Installed&#93;
useless...

For more infos, i have downloaded this interesting document from Microsoft:
Installing_DotNet_Framework

#4 joakim

joakim

    Silver Member

  • Team Reboot
  • 912 posts
  • Location:Bergen
  •  
    Norway

Posted 30 August 2009 - 04:23 PM

New package for Vista & Server 2008 is ready

http://www.mediafire..._vista_LODR.rar

It is a heavy modification of Max_Real Qnx's original script. Includes dotnet2 & VC 2005 Runtimes. Needs less than 30 Mb of free space in X:\, which means dotnet2 & vc2005 can easily be added to a standard vista recovery cd with scratchspace of 32 Mb without rebuilding it. Downloadable package is at 54 Mb.

From the readme.txt;

LODR for dotnet2 for vista/2008.



2 options;



- dotnet2_vista_split_LODR.exe

Installs to X&#58;\ only the parts that cannot be placed outside %SystemRoot%, and keep the rest on alternative drive. Needs 29,6 Mb of free space on X&#58;\.





- dotnet2_vista_full_LODR.exe

Installs all dotnet2 binaries to X&#58;\, which means roughly 60 Mb of free space on X&#58;\. There is no advantage of using this option so go for the split option.



The Mb notations are given as compressed &#40;since X&#58;\ would be compressed&#41;.



How To;

Just place this folder &#40;&#34;dotnet2_vista_LODR&#34;&#41; somewhere accessible to your running PE environment and execute dotnet2_vista_split_LODR.exe once. Dotnet2 is installed in a few seconds. Do not rename the folders inside this one. There should be 3 folders; &#34;Microsoft.NET&#34;, &#34;NativeImages&#34; and &#34;Windows&#34;. The path to dotnet2_vista_split_LODR.exe can be almost anything. Some examples;



&#34;D&#58;\blabla\dotnet2_vista_split_LODR.exe&#34;

&#34;H&#58;\whatever\whatever\dotnet2_vista_split_LODR.exe&#34;

&#34;R&#58;\dotnet2_vista_split_LODR.exe&#34;

&#34;X&#58;\programs\dotnet2_vista_LODR\dotnet2_vista_split_LODR.exe&#34;

Joakim

#5 joakim

joakim

    Silver Member

  • Team Reboot
  • 912 posts
  • Location:Bergen
  •  
    Norway

Posted 22 September 2009 - 09:26 AM

Dotnet2 also available the LODR way for Win7Pe (RC1). No beta sources supported.

dotnet2_win7rc1_LODR

Requires 46 Mb of free space on X:\.

Joakim

#6 Iowahc

Iowahc
  • Members
  • 1 posts
  •  
    Austria

Posted 16 December 2009 - 12:26 PM

Hey there,

On my XPSP3 PE Norton Ghost 14 tells me there is no .net installed, after running the non_ntfs.cmd

am I missing something?

Cu

#7 The Architect

The Architect
  • Members
  • 2 posts
  •  
    United States

Posted 27 July 2010 - 04:46 PM

Dotnet2 also available the LODR way for Win7Pe (RC1). No beta sources supported.

dotnet2_win7rc1_LODR

Requires 46 Mb of free space on X:\.

Joakim



I'm new to the world of WinPE, but not to the world of IT. :cheers:

I'm needing to get .net 2 into my Windows 7 Boot.wim. I tried the dotnet2_win7rc1_LODR, but I'm not sure that I'm calling the EXE correctly.

I unzipped the zip into X:\Windows\Temp\dotnet.... then call the EXE from there using the winpeshl.ini:

[Launchapps]
x:\windows\temp\dotnet2_win7_LODR\dotnet2_win7_LODR.exe

I get the DOS box that comes up and says that a "winpeshl.ini exists, but nothing was executed"

If go to the folder and try to execute dotnet2_win7_LODR.exe, I get the error message stating that the subsystem needed to run this is not installed.

What am I doing wrong, if there a better location to force PE to run an executable?

In the end, we are needing to launch a .net utility, that requires network access, before setup starts so we can gather info and create the unattended.xml, etc.

Any help would be greatly appreciated.

Thanks

#8 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 27 July 2010 - 04:52 PM

I guess you are missing the basic idea of the LODR-U approach. :cheers:

Read here first:
http://www.boot-land...?showtopic=6621

:cheers:
Wonko

#9 The Architect

The Architect
  • Members
  • 2 posts
  •  
    United States

Posted 27 July 2010 - 05:48 PM

I guess you are missing the basic idea of the LODR-U approach. :cheers:

Read here first:
http://www.boot-land...?showtopic=6621

:cheers:
Wonko


Wonko, thanks for the link, but I'm still a little lost. The link looks more like it is for building LODR packs, maybe I missed something in the 50+ pages :cheers:. For now I'm interested in getting .net installed then I'll work on, I guess, building a LODR for our utility.

I basically just need to know how/where to call the LODR as winpe is booting. There's mention of the prenetwork-batch.cmd and late-batch.cmd. Are these normal winpe recognized cmd files? I can't find anything else about them on the net, so I'm guessing not.

Thanks,
Greg

#10 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 27 July 2010 - 06:15 PM

No, I guess there was a misunderstanding. :cheers:

The LODR approach is a sort of "install on demand" from what you posted I thought you were looking to "install permanently" the stoopid thing to a PE that you want to re-package and somehow distribute. :cheers:

It is possible that the actual .EXE doesn't work because:
  • your PE misses some pre-requisite (libraries and what not)
  • your PE is most probably RTM based, whilst the program was tested on rc1



You are booted in your PE and running directly from command prompt dotnet2_win7_LODR.exe gives you an error right?

Post the exact error, from what you write the error is due to #1.

Try tracing it with dependency walker and/or similar tools.

:cheers:
Wonko

#11 calmeat

calmeat
  • Deactivated
  • 1 posts
  •  
    United States

Posted 09 September 2010 - 03:27 AM

Joakim,
Any chance you can try to build for a win7 that is not rc1?
I have tried running it and it gives me an error saying that it will exit since the OS is not RC1. If not can you tell me what the exe does so i can try it in my build. Thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users