Help - Search - Members - Calendar
Full Version: Shell problems
The CD Forum > The CD Forum > WinBuilder
royalbox
This is probably directed at Peter or Nuno really, but if anyone else can help please chip in.
I know I'm being naughty and not using the build as given rolleyes.gif, but I only want to use the very core of NativeEx_barebone_075. I don't want explorer as a shell, I don't want to compress anything, I don't want any of the apps etc...

So, I'm using the core files:
CODE
1 - ProjectInfo.Script
2 - MakeDirs.Script
3 - hivesFactory.Script
5 - CopyAndExpand.Script
EmptyHive.Script
scriptLog.script
script.project
CreateISO.script (CreateSimpleIso section)


I've been through every script line-by-line and commented out any references to things I'm not using like UPX, autocompress and any other references to unused things.

Okay, so the ISO boots into the command processor which is all nice and hunky-dory.
But, it seems to be using the wrong font for the text in the titlebar. I included Ariel.

The main problem though is when I try another shell. to keep it simple I'm trying Nu2Menu first (not nu2shell starting nu2menu) and it just reboots.

Here is my basic script:
CODE
[Process]
FileCopy,%ScriptDir%\nu2menu\nu2go.bmp,%target_sys%
FileCopy,%ScriptDir%\nu2menu\nu2menu.exe,%target_sys%
FileCopy,%ScriptDir%\nu2menu\nu2menu.xml,%target_sys%
FileCopy,%ScriptDir%\nu2menu\nu2menumsg.exe,%target_sys%
If,%pCheckBox1%,Equal,True,Run,%ScriptFile%,SetShell

[SetShell]
RegHiveLoad,PE_SYSTEM,%target_sys%\setupreg.hiv
RegWrite,HKLM,0x1,PE_SYSTEM\Setup,CmdLine,nu2menu.exe
RegHiveUnLoad,PE_SYSTEM

[Interface]
pCheckBox1="Set Nu2Menu as the default shell",1,3,10,39,200,19,True


This is the only shell checked. This same script works with a pebuilder built build (there's a mouthful).

Any hints please? If it's a case of using depends.exe or something to see what nu2menu requires then that's fine, there are a lot of files missing compared to a bartpe build, but if it's something simpler — or harder — please do tell.

ADDED: I should mention that I loaded setupreg.hiv on my system and checked that the correct line was added and it was.

I thank thee.
royalbox
Well, I solved the nu2menu problem. I had hojope set at level 1 instead of 2. Now, nu2shell is a different matter. I get the message:

MessageBox caption:
QUOTE
lsass.exe application error

MessageBox message:
QUOTE
the application failed to initialize properly (0xc0000142)


Would this be a registry thing again?

I thank thee.
Nuno Brito
Many dependencies are bound to be missing from your project so it's now a detective task to find them and add back as strictly necessary.

---------------

Dependency Walker is a good tool to help you diagnose what might be missing.
http://www.dependencywalker.com/

The profile tool inside Dependency Walker has helped me many times to find the DLL's that needed to be added.

----

It might also help to run Process Monitor and see which files or registry keys the program is expecting to find.

You will need to set the filters to correctly ignore all other processes going at the same time and only display messages from your program.

Get it here:
http://technet.microsoft.com/en-us/sysinte...s/bb896645.aspx

If none of the above mentioned programs run inside your boot disk, then it might be an indication that you're slimming too many dependencies that give support for Win32 GUI programs.

smile.gif
royalbox
Thanks Nuno. I do have dependency walker but I will have to spend some time learning how to really use it as in the past I found that it appears to show an enormous amount of files and registry queries. Also, even on my main system, whatever app I try, it seems to always shows a couple of files as being missing, yet everything on my system runs without problem.

QUOTE
If none of the above mentioned programs run inside your boot disk, then it might be an indication that you're slimming too many dependencies that give support for Win32 GUI programs.

Yes, though my build is essentially NativeEx_barebone_075 without explorer as the shell. I suppose setting explorer as the shell will also add the dependancies, but I don't want it as the shell. I'll have to dig around in the scripts some more.

By the way, I searched for lsass in my registry and find that there is a service associated with it and another service that it depends on. I think that if no-one can help then it's down to dependency walker as you suggest.

Thanks for replying.
royalbox
Oh, about process monitor:
http://www.911cd.net/forums//index.php?showtopic=22595 wink.gif
Galapo
I'd firstly try your shell script in a default nativeEx without removing other things other than other shells. This way if it works you can work back from there.

Not sure, but you may need to add a ramdisk for writable %temp%.

Regards,
Galapo.
royalbox
QUOTE
I'd firstly try your shell script in a default nativeEx without removing other things other than other shells. This way if it works you can work back from there.

That's essentially what I have done, I've taken the core files and commented out the parts that caused build errors when cmd.exe was set as the shell. Popups telling me that such-and-such doesn't work without explorer, and one that showed a path to what looked like documents and settings... only in German (or similar).

Okay, well I (re)wrote a simple app that removes the resource limits and starts the specified shell and this works where nu2shell failed in this build. However, I added task manager, regedit and process monitor none of which will run (yes, I included the extra files like in the scripts that come with barebones). I also added a ramdrive script that I modified from the bartpe plugin which I know works when I use pebuilder to build the core. This does not load however.

Without process monitor I have no hope of getting anything else to run. Looks like I'll have to stick with pebuilder to build the core and remove files as suggested in the PE documentation. I really wanted to get this small core build to work but it looks like it's not any use other than using the command processor.

In NativeEx_barebone_075, things seem to be made very hard to decipher. The OLE script for example extract a mysterious regredirector.exe and the usage that this displays is very vague like hojope.exe. Nothing is commented either.

Anyway, thanks for replying.
Galapo
QUOTE (royalbox @ Feb 7 2009, 07:32 AM) *
The OLE script for example extract a mysterious regredirector.exe and the usage that this displays is very vague like hojope.exe.

That is the program which allows registry redirection so that build-time dll registration can be performed.

Regards,
Galapo.
royalbox
Thanks Galapo.

Right then, I've taken the advice and extracted NativeEx_barebone_075.zip to a new folder so that I know everything is as it should be and tickety-boo. I carefully go through every script, read what it does, choose the options, check it or unchecked it. I press the play button and after a while I get the error that I always seem to get which is:
QUOTE
with parameters: [DE],[%SystemRoot%\system32\regedit.exe],[Registry Editor]
AddVariables - File [C:\Dokumente und Einstellungen\Peter\Desktop\Neuer Ordner (5)\Projects\nativeEx_Core\Basic\Shells\Explorer.Script] was not found!
Halt

Why is there a reference to Peter's desktop here? huh.gif Why is it looking for explorer.script when I selected to have the command console as the shell?

I'm too tired to go wading through the code again today, any hints here please?

I thanketh thee.
royalbox
The problem is to do with creating shortcuts. After commenting out any reference to creating shortcuts in the scripts, it built without error. No executable will run however, just like before. The ramdrive (imDisk) doesn't appear to have been created.

There is the option to set command console as the shell but, in truth, this project is only really able to run with explorer as the shell isn't it? Am I wasting time here? Should I forget this and just go back to using pebuilder and put up with the larger build?

I thank thee.
Nuno Brito
QUOTE
There is the option to set command console as the shell but, in truth, this project is only really able to run with explorer as the shell isn't it? Am I wasting time here? Should I forget this and just go back to using pebuilder and put up with the larger build?


You seem to have removed too many files that are necessary for the UI win32 programs to run and in this case it's only natural to expect support only for console based programs like in the good old DOS era.

You don't need to go back to PeBuilder, just build a nativeEx like it comes by default and ensure that your program runs to get a working base which is way smaller and efficient than bartPE in size wise.

After creating a working base, you shouldn't need neither bartPE nor winbuilder, rely only on your manual modifications and make several copies of the working base as your project gets smaller.

You manually remove files from the boot disk project on a trial&error basis that ensures that your program is running until you get your satisfactory slim result without explorer or any other "bloat".

smile.gif
royalbox
Thanks Nuno, sorry for ranting on a bit, I was getting frustrated because I'd spent so much time on this and couldn't get it to do what I wanted.

I did what you said, I created a build with the explorer shell and it boots and runs programs fine. It's significantly smaller than what pebuilder produces so I'm going to stick with it and set it up to my way with a more basic shell. Thanks for all your help.

By the way, I had to disable the regCompcat script as regCompact.exe always crashed. Don't know if I can help you debug this but let me if you want me to, although I assume that Peter is the chap to talk to about that (and the fact that there is a path to his own desktop included in a script somewhere!).

Thanks again.
psc
QUOTE (royalbox @ Feb 7 2009, 09:44 PM) *
By the way, I had to disable the regCompcat script as regCompact.exe always crashed. Don't know if I can help you debug this but let me if you want me to, although I assume that Peter is the chap to talk to about that (and the fact that there is a path to his own desktop included in a script somewhere!).

Please post the registry hive which lets regCompact crash.

If there are private information inside, like license keys, PM me.

Peter
royalbox
Hello Peter, this problem doesn't exist anymore. I had disabled the script but then tried it again a few days later after having made lots of changes and it worked and has worked since.
TheHive
If you happen to have created a working modified project with a different shell. Can you share that project. Im sure it would benefit the Winbuilder users who are seeking something similar to what propose to do in youre posts.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.