Jump to content











Photo
- - - - -

No Tmp_software hive in VistaPE?


  • Please log in to reply
12 replies to this topic

#1 JonF

JonF

    Gold Member

  • .script developer
  • 1185 posts
  • Location:Boston, MA
  •  
    United States

Posted 04 March 2007 - 02:33 PM

I picked up a couple of scripts that probably were not originally written for Vista PE. Lines of the form:

RegHiveLoad,Tmp_setupreg_hiv,%TargetDir%\i386\System32\setupreg.hiv

RegWrite,HKLM,0x1,"Tmp_setupreg_hiv\ControlSet001\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}","Class","Display"

RegHiveUnLoad,Tmp_setupreg_hiv

Always fail (on XP PRo). Is this a limitation of Vista or VistaPE?

#2 Brito

Brito

    Platinum Member

  • .script developer
  • 10565 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 March 2007 - 02:53 PM

It's a limitation from neither projects, it's just a script that was created for XP / 2003 projects not for vistaPE.

You have to be more specific and tell us from wich script you've extracted those lines to be able to place in the right project.

Scripts follow common rules, but projects can use very different sources to build boot disks so you need to use the scripts that were specifically created to work with each project.

The line you've posted wouldn't work on VistaPE since it uses "Windows" as root folder (winpe2.0 default), while XP/2003 will look for "I386" (winpe1.x default)


Hope this helps you! :P

#3 JonF

JonF

    Gold Member

  • .script developer
  • 1185 posts
  • Location:Boston, MA
  •  
    United States

Posted 04 March 2007 - 03:24 PM

There has to be a more fundamental flaw than bad registry values; loading the hive always fails.

The line you've posted wouldn't work on VistaPE since it uses "Windows" as root folder (winpe2.0 default), while XP/2003 will look for "I386" (winpe1.x default)

I don't understand.

Well, that section of one of the scripts was created by the WinBuilder Tools | Convert working on a BartPE .INF for Virtual PC 2007 VM additions. I'm trying to pick this stuff up and I figured that would be a useful and challenging task to use as a learning experience. Here's the BartPE version that works with an XP build source:

[Software.Addreg]



0x1, "Classes\CLSID\{30C14BAC-122C-42ED-B319-1139DBF48EB8}","","VPCCopyHook"

0x1, "Classes\CLSID\{30C14BAC-122C-42ED-B319-1139DBF48EB8}\InProcServer32","","\Programs\VMADD2007\VPCShExG.dll"

0x1, "Classes\CLSID\{30C14BAC-122C-42ED-B319-1139DBF48EB8}\InProcServer32","ThreadingModel","Apartment"



0x1, "Classes\Directory\shellex\CopyHookHandlers\VPCCopyHook","","{30C14BAC-122C-42ed-B319-1139DBF48EB8}"



0x4, "Microsoft\Windows\CurrentVersion\SharedDlls","\system32\vmsrvc.dll", 0x00000001



0x1, "Microsoft\Windows\CurrentVersion\Shell Extensions\Approved","{30C14BAC-122C-42ed-B319-1139DBF48EB8}","VPCCopyHook"

And here's what the translator gave me:

Echo,"Loading registry hive: [%TargetDir%\i386\System32\Config\software]"

RegHiveLoad,Tmp_software,%TargetDir%\i386\System32\Config\software

Echo,"Writing new values on registry hive.."

RegWrite,HKLM,0x1,"Tmp_software\Classes\CLSID\{30C14BAC-122C-42ED-B319-1139DBF48EB8}","","VPCCopyHook"

RegWrite,HKLM,0x1,"Tmp_software\Classes\CLSID\{30C14BAC-122C-42ED-B319-1139DBF48EB8}\InProcServer32","","\Programs\VMADD2007\VPCShExG.dll"

RegWrite,HKLM,0x1,"Tmp_software\Classes\CLSID\{30C14BAC-122C-42ED-B319-1139DBF48EB8}\InProcServer32","ThreadingModel","Apartment"

RegWrite,HKLM,0x1,"Tmp_software\Classes\Directory\shellex\CopyHookHandlers\VPCCopyHook","","{30C14BAC-122C-42ed-B319-1139DBF48EB8}"

RegWrite,HKLM,0x4,"Tmp_software\Microsoft\Windows\CurrentVersion\SharedDlls","\system32\vmsrvc.dll","1"

RegWrite,HKLM,0x1,"Tmp_software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved","{30C14BAC-122C-42ed-B319-1139DBF48EB8}","VPCCopyHook"

RegHiveUnLoad,Tmp_software

Is it failing because the Vista registry structure is different, or what? Is there a way to add those items to the registry in VistaPE?

#4 Brito

Brito

    Platinum Member

  • .script developer
  • 10565 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 March 2007 - 03:56 PM

It's not a bad registry value, it's just that VistaPE uses a Windows folder and not a I386 like I've mentioned on the previous post.

Try looking on your VistaPE project where winbuilder.exe is located. Inside there is a folder called Target, go inside it and find another folder called Windows.

There is the core for your boot disc - where system32\config has a software hive.

To solve this issue, just rename the load hive line to:

RegHiveLoad,Tmp_software,%TargetDir%\Windows\System32\Config\software


Is it failing because the Vista registry structure is different, or what? Is there a way to add those items to the registry in VistaPE?


Vista and XP registry hives are compatible with each other.

Using wb you can automate the manual process of adding these new keys - there's no need to restart a project from scratch just run the selected script to add the changes on the hives.

In an manual fashion you can use the command line, just open cmd.exe and go to the same folder where the hives are placed (TargetDir\Windows\System32\Config)

Then use reg.exe to load them to your local registry:

reg.exe load HKLM\test software

Open up RegEdit and check all the VistaPE keys on HKEY_LOCAL_MACHINE\Test

After applying the changes, you need to unload this hive using:

reg.exe unload HKLM\test
(don't forget to close the regedit window first)


You can also load hives directly from regedit, but I would avoid it just to keep the hives under close control.


As you can see, the converted script you get from the plugin is very similar to the command line code you need to use to load hive from cmd.exe - so I hope this helps you understand how this process works.

There are still some translation that are not handled correctly, I suggest also using the Inf2Script tool from NIKZZZZ - it can be downloaded here: http://thuun.boot-la.../Inf2Script.exe


Please place any more doubts you might have and I will try to help the best I can, a good way to learn is trying to get things done as you already are doing all by yourself - good luck!! :P

#5 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 04 March 2007 - 04:04 PM

The \Programs inside the registry keys also in my opinion are candidates for troubles.

Should be replaced by 'the real program folder' >> 'program files' in English; 'programme' in German, etc. (???)

Peter

#6 JonF

JonF

    Gold Member

  • .script developer
  • 1185 posts
  • Location:Boston, MA
  •  
    United States

Posted 04 March 2007 - 09:21 PM

It's not a bad registry value, it's just that VistaPE uses a Windows folder and not a I386 like I've mentioned on the previous post.

Ah, now I understand. Thank you.

#7 JonF

JonF

    Gold Member

  • .script developer
  • 1185 posts
  • Location:Boston, MA
  •  
    United States

Posted 04 March 2007 - 09:52 PM

The \Programs inside the registry keys also in my opinion are candidates for troubles.

Should be replaced by 're real program folder' >> 'program files' in English; 'programme' in German, etc. (???)

Well, if all the paths are created by the script, there should be no failure. You might wind up with some of your programs in "Programs" and some in "Programme", but they should all work.

It seems to me that i386 versus windows is a serious issue; there should be some way of detecting which is appropriate so scripts can run with differnt build sources. In VistaPE both the %TargetWin% and %TargetSys32% point to i386 ... or is there some other testable variable I don't kinowabout?

#8 Brito

Brito

    Platinum Member

  • .script developer
  • 10565 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 March 2007 - 09:59 PM

Those variables have become obsolete - at first we only used XP based projects, now those hardcoded variable are not needed anymore since other projects like VistaPE and ReactOS won't need them for anything.

Using nativeEX based projects you get a custom created ProjectInfo.ini file where all the details regarding the OS are placed, this helps you figure where to read the needed paths to place the program and where to find the registry hives.

VistaPE is not (yet) using this method, should take a bit longer to be added.

:P

#9 NightMan

NightMan

    Frequent Member

  • .script developer
  • 433 posts
  • Location:Russian, Moscow

Posted 05 March 2007 - 08:00 PM

Registry variables in VistaPE:
%RegSoftware%=%TargetDir%\windows\system32\config\software
%RegSystem%=%TargetDir%\windows\system32\config\system
%RegUser%=%TargetDir%\windows\system32\config\default
%RegDefault%=%TargetDir%\windows\system32\config\default

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

\windows\system32\config\software = \i386\system32\config\software
\windows\system32\config\system = \i386\system32\setupreg.hiv
\windows\system32\config\default = \i386\system32\config\default

(as i remember)

#10 NightMan

NightMan

    Frequent Member

  • .script developer
  • 433 posts
  • Location:Russian, Moscow

Posted 05 March 2007 - 08:10 PM

Nuno Brito

VistaPE is not (yet) using this method, should take a bit longer to be added.


i use script.project for all settings, it's better, that have many ini files :P

[see "VistaInfo" in script.project, it's will be writed and modify by preconfig script]

#11 Brito

Brito

    Platinum Member

  • .script developer
  • 10565 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 05 March 2007 - 08:14 PM

Nice! :P

#12 NightMan

NightMan

    Frequent Member

  • .script developer
  • 433 posts
  • Location:Russian, Moscow

Posted 05 March 2007 - 08:38 PM

Nuno Brito

Nice!

:P

ps you very help with support for users, thanks :P

#13 Brito

Brito

    Platinum Member

  • .script developer
  • 10565 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 05 March 2007 - 08:54 PM

Thanks, these are details on the registry that people sometimes confuse.

Wish I had more time to play around with Vista - on a happy note: just received my vista dvd on my mailbox and will try out soon, only need to clean up my work machine first since it needs at least 14Gb and my disk is just too clutered..

Good luck with your development! :P




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users