Jump to content











Photo
- - - - -

RegAddBoot in the Win7PE_SE project


  • This topic is locked This topic is locked
7 replies to this topic

#1 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 03 January 2011 - 08:46 PM

i must ask:
regarding booting the final .iso,
(i mean not during build time but at boot)
what is the result of the api command 'RegAddBoot' in the Win7PE_SE project?


(as i know there is no effect at all of the api command 'RegAddBoot' in the Win7PE_SE project,
as it simply writes some info into the file %PE_CFG% into the section [registry],
what is simply not processed at boot time,
or am i wrong?)

#2 ChrisR

ChrisR

    Silver Member

  • .script developer
  • 784 posts
  •  
    France

Posted 03 January 2011 - 09:27 PM

I was a little lost on the information that I read after the removal of the loader win7peldr.exe(by Joshua's) in Multi7Pe_Se. What I wrote at the beginning for RegAddBoot was not right :dubbio: , sorry.

The Api command RegAddBoot' writes some info into the file %PE_CFG% into the section [registry],
This section is read by the program shortcuts.exe, which is run at startup, and that seems to work properly.

Here a Quick overview of shortcuts.exe : post156
:unsure:


#3 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10549 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 04 January 2011 - 03:20 AM

Just to provide some clarification. Albeit RegAddBoot is called as API command, it is not intended to be called from inside an app script but rather from the other side of API implementation.

I've made a small diagram to explain this better:
Posted Image

When you want to create a shortcut, it is the API that should worry about how it is created, let it be using regaddboot, buildmodel, shortcuts.exe or any other model that the project author considers adequate.

For the app script writer, he needs only to call add_shortcut and don't worry about implementation details that are specific to the project.

:cheers:

#4 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 04 January 2011 - 07:16 AM

The Api command RegAddBoot' writes some info into the file %PE_CFG% into the section [registry],
This section is read by the program shortcuts.exe, which is run at startup, and that seems to work properly.

Here a Quick overview of shortcuts.exe : post156
:cheers:

Hi ChrisR
Thanks for the clarification!

#5 paraglider

paraglider

    Gold Member

  • .script developer
  • 1729 posts
  • Location:NC,USA
  •  
    United States

Posted 04 January 2011 - 09:54 AM

Are you sure about RegAddBoot? Last time I looked it was nothing to do with creating shortcuts - its all about creating registry entries at boot time.

See http://wb.paraglider...RegAddBoot.html for details.

#6 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10549 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 04 January 2011 - 10:23 AM

In this context we see it used to create shortcuts.

For that purpose it is better to use the standard shortcut_add command.

----

Since we're discussing a (mis)use of RegAddBoot, perhaps it is healthy to question its purpose inside an app script.

Can someone please point me the reason why it is deemed as necessary for any real life purpose?

----

Good documentation Paraglider, I liked your page.

:cheers:

#7 homes32

homes32

    Gold Member

  • .script developer
  • 1030 posts
  • Location:Minnesota
  •  
    United States

Posted 04 January 2011 - 02:38 PM

----

Since we're discussing a (mis)use of RegAddBoot, perhaps it is healthy to question its purpose inside an app script.

Can someone please point me the reason why it is deemed as necessary for any real life purpose?

----


the main idea is that as the command is processed at boot time it can be used expand vars for reg keys/programs that can't/don't support expanding vars and to avoid hard coding paths and drive letters.

for example.
in my mbam script I use the following lines to register the shell extension; which MUST be a full absolute path.

RegAddBoot,HKLM,0x2,"Software\Microsoft\Windows\CurrentVersion\App Paths\mbam.exe",,"%PE_Programs%\%ProgramFolder%\mbam.exe"

RegAddBoot,HKLM,0x2,"Software\Microsoft\Windows\CurrentVersion\App Paths\mbam.exe","Path","%PE_Programs%\%ProgramFolder%"


also another use is that with vista/win7 sometimes programs are in RAM and sometimes they are on the CD. 2 different drive letters/paths. by using RegAddBoot and %PE_Programs%\%ProgramFolder% you can always be sure that you are pointing to the correct path.

it shouldn't be used for everything as it increases boot time, but it does have its purpose.

-Homes32

#8 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10549 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 04 January 2011 - 11:08 PM

in my mbam script I use the following lines to register the shell extension; which MUST be a full absolute path.

Then I'd recommend you to register shell extensions like other app scripts do.

Here is an example where RegAddBoot was replaced with reg_add: http://livexp.boot-l...ager_SJL.script

And if my argument fails to convince you, I won't be surprised but it doesn't change the fact that it is plain redundant.


The same goes for defining if an app script should define preference to run in RAM or not. But that is the subject for another topic.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users