Topic: RegHiveLoad - Failed to load registry hive  (Read 3394 times)

0 Members and 1 Guest are viewing this topic.

RegHiveLoad - Failed to load registry hive
« on: February 05, 2017, 06:45:15 PM »

VeeDub

  • Jr. Chef
  • **
  • Date Registered: Feb 2014
  • Posts: 60
Hello,

I am getting this error with a plugin that I am writing

Code: [Select]
[Failed]  (Shadow-505.script Imaging: ShadowProtect v5.05) RegHiveLoad - Failed to load registry hive: [Tmp_Software] From file: [%target_sys%\config\software]: Unknown error

I have compared the syntax of the reghiveload command in question with a couple of other plugins that work and the code appears to be identical, so I'm not sure what the issue is (I assume that there is some earlier code which I'm missing that I need).

I've included an extract of the main code of the plugin. I'm aware that there is another ShadowProtect plugin available, but it has different requirements to what I already have plus I have another plugin with the same issue. So fixing this plugin will allow me to resolve a couple of issues.

Code: [Select]
[Main]
Title=Imaging: ShadowProtect v5.05
Type=Plugin
Author=VeeDub
Description=(v5.05) StorageCraft® ShadowProtect® provides backup and disaster recovery, data protection, and managed system migration for Windows systems on virtual and physical machines. Recover systems, applications, and data to the same or different hardware or virtual environment.
Version=001
Download_Level=2
Level=5
Selected=True
Mandatory=False
NoWarning=False
Contact=http://TheOven.org
Date=2017.02.05

[Interface]
pBevel1=pBevel1,1,12,3,1,110,68
pCheckBox1=Desktop,1,3,10,4,59,14,True,"__Desktop Shortcut"
pCheckBox2="Start Menu",1,3,10,23,76,14,True,"__Start Menu Shortcut"
pTextBox1=,1,0,7,43,99,21,"HD Tasks\Imaging","__'Start Menu' Folder"

[Variables]
%ProgramTitle%="ShadowProtect v5.05"
%ProgramEXE%=ShadowProtectPE.exe
%ProgramFolder%="ShadowProtectPE"

[Process]
Echo,"Processing %ScriptTitle%..."
Arch,x86|x64
If,ExistDir,%targetdir%\Windows\ShadowProtectPE,Call,DirDelete,%targetdir%\Windows\ShadowProtectPE
If,Not,ExistDir,%targetdir%\Windows\ShadowProtectPE,DirMake,%targetdir%\Windows\ShadowProtectPE
If,Not,ExistDir,%targetdir%\Programs,DirMake,%targetdir%\Programs
If,ExistDir,%targetdir%\Programs\ShadowProtectPE,Call,DirDelete,%targetdir%\Programs\ShadowProtectPE
If,Not,ExistDir,%targetdir%\Programs\ShadowProtectPE,DirMake,%targetdir%\Programs\ShadowProtectPE
If,ExistDir,Call,DirDelete,%targetdir%\Programs\PeNetwork
If,Not,ExistDir,%targetdir%\Programs\PeNetwork,DirMake,%targetdir%\Programs\PeNetwork
If,Not,ExistDir,%targetdir%\Programs\PeNetwork\x64,DirMake,%targetdir%\Programs\PeNetwork\x64
//--
FileCopy,%ScriptDir%\SPExplorer\*.*,%targetdir%\Windows\ShadowProtectPE
FileCopy,%ScriptDir%\PeNetwork\x64\*.*,%targetdir%\Programs\PeNetwork\x64
FileCopy,%ScriptDir%\ShadowProtectPE\*.*,%targetdir%\Programs\ShadowProtectPE
//--
RegHiveLoad,Tmp_Software,%RegSoftware%
RegWrite,HKLM,0x1,Tmp_Software\Wow6432Node\ShadowStor\ShadowProtectPE\Settings,"LoggingDir", "B:\"
RegWrite,HKLM,0x4,Tmp_Software\Wow6432Node\ShadowStor\ShadowProtectPE\Settings,"LoggingEnabled", 0x00000001
RegHiveUnLoad,Tmp_Software
RegHiveLoad,Tmp_Default,%RegDefault%
RegWrite,HKLM,0x1,Tmp_Default\Software\ShadowStor\ShadowProtectPE\Settings,"LoggingDir", "B:\"
RegWrite,HKLM,0x4,Tmp_Default\Software\ShadowStor\ShadowProtectPE\Settings,"LoggingEnabled", 0x00000001
RegHiveUnLoad, Tmp_Default
//--
If,%pCheckBox1%,Equal,True,Add_Shortcut,Desktop
If,%pCheckBox2%,Equal,True,Add_Shortcut,StartMenu,%pTextBox1%

A fix would be great or a pointer to how I can identify the issue would be fine as well.

Thanks

VW

Re: RegHiveLoad - Failed to load registry hive
« Reply #1 on: February 05, 2017, 11:15:24 PM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 1982
The line looks ok. The error could be caused by the hive still being mounted by a previous plugin and not unmounted properly.

Regards,
Galapo.

Re: RegHiveLoad - Failed to load registry hive
« Reply #2 on: February 06, 2017, 01:55:49 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7386
The line looks ok. The error could be caused by the hive still being mounted by a previous plugin and not unmounted properly.

Since VeeDub is an old user,
I feel using an old personal script cause such failure on VeeDub side.

http://theoven.org/index.php?topic=1047.msg22634#msg22634

And VeeDub,

I had previously written for Win7PE and which were working before

We do not support old scripts, we use plugins created for projects here.

 It is yet another reason we deprecate scripts name and use plugin name to files we use on projects.

do not mix old with new as written to you before here.


http://theoven.org/index.php?topic=2005.msg22523#msg22523
.....




VeeDub,

You need to use old school elimination method to figure out.

If it is a plugin on servers, let us know we will quickly fix and update as you experienced recently.  :thumbsup:
If it is of your personal old script cause such failure, still let us know, so we can provide proper feedback.  :thumbsup:

:turtle:

Re: RegHiveLoad - Failed to load registry hive
« Reply #3 on: February 06, 2017, 01:40:06 PM »

VeeDub

  • Jr. Chef
  • **
  • Date Registered: Feb 2014
  • Posts: 60
@Lancelot

This is a rewrite of a new plugin from scratch with the intention of using it in the MyPlugins_Direct section, so that it won't interfere with any of the downloaded plugins.

I've taken a plugin shell and then tried to add in the sections that I need. So this is not the old script.

In simple terms I need to copy files and add a couple of registry entries.

For the registry entries I have studied some working plugins and that is the code that they use.

The line looks ok. The error could be caused by the hive still being mounted by a previous plugin and not unmounted properly.
Unfortunately this is not the issue, as I am seeing this error when I run the plugin stand-alone to troubleshoot.

If there isn't an obvious answer I'll try using another plugin as the starting point.

Thanks
VW
« Last Edit: February 06, 2017, 01:41:48 PM by VeeDub »

Re: RegHiveLoad - Failed to load registry hive
« Reply #4 on: February 06, 2017, 04:22:43 PM »

Prz42

  • Code Baker
  • Chef
  • ***
  • Date Registered: Jan 2014
  • Posts: 431
If you ran the plugin by it self and the target and temp are cleared out
it will fail. You probably didn't do that. I tried running the plugin and
it worked with no errors except for the copy the folder to target, since
there is no files in the script directory.

Re: RegHiveLoad - Failed to load registry hive
« Reply #5 on: February 06, 2017, 07:57:39 PM »

VeeDub

  • Jr. Chef
  • **
  • Date Registered: Feb 2014
  • Posts: 60
it worked with no errors except for the copy the folder to target, since
there is no files in the script directory.
@Prz42

This is useful feedback, it is interesting that you're not seeing the RegHiveLoad error that I am seeing.

I wonder whether I have the plugin in the wrong place. I am using:
C:\Win8PE\Projects\MyPlugins_Direct\AppsMy\HD Tasks\Imaging\Shadow_v5.05

Apart from this plugin I am using Utils\Update Win8PESE (Exact and Secure) and all the other plugins are have been downloaded from AppYGS or TweaksY so my setup should be a supported config.

After some more testing ....

There appears to be some issue with the entire project.

I tried moving the Project from the F: drive (e.g. F:\Win8PE) to the C: drive (C:\Win8PE) as I wondered whether that might help.

Now when I build (i.e. Play) there aren't any errors, but the project stops after a few seconds instead of running around 70 plugins. So somehow I have broken something.

Log file attached

VW

Re: RegHiveLoad - Failed to load registry hive
« Reply #6 on: February 06, 2017, 08:15:25 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7386
VeeDub

Adding 3rd party plugins: \Downloads\ - MyPlugins_Direct - Yomi
http://theoven.org/index.php?topic=1208.0

see:
Reminder 1:

Re: RegHiveLoad - Failed to load registry hive
« Reply #7 on: February 07, 2017, 07:04:32 AM »

Prz42

  • Code Baker
  • Chef
  • ***
  • Date Registered: Jan 2014
  • Posts: 431
I wonder whether I have the plugin in the wrong place. I am using:
C:\Win8PE\Projects\MyPlugins_Direct\AppsMy\HD Tasks\Imaging\Shadow_v5.05

I tried moving the Project from the F: drive (e.g. F:\Win8PE) to the C: drive (C:\Win8PE) as I wondered whether that might help.

Now when I build (i.e. Play) there aren't any errors, but the project stops after a few seconds instead of running around 70 plugins. So somehow I have broken something.

VW
I put all my plugins @ D:\Builder\Projects\MyPlugins_Direct\Apps
The source directory @ D:\Dev8_x64\sources

Also you must have the Source Directory and the Project on the same drive.
Most parts of the Builder can't cross connect across drives.
Also use shortest path.
« Last Edit: February 07, 2017, 07:06:31 AM by Prz42 »

Re: RegHiveLoad - Failed to load registry hive
« Reply #8 on: February 07, 2017, 09:01:24 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7386
Also you must have the Source Directory and the Project on the same drive.
Are you sure.
 Source Directory and Project Directory not required on the same drive, no report yet.
   If there is such a case, open a topic for this, providing all info.

:turtle:

Re: RegHiveLoad - Failed to load registry hive
« Reply #9 on: February 07, 2017, 06:41:05 PM »

VeeDub

  • Jr. Chef
  • **
  • Date Registered: Feb 2014
  • Posts: 60
OK well I have at least got the project working again.

It seems that when specifying the source, you must have the Win8PE SE highlighted on the left-hand side.

If you don't have Win8PE SE highlighted, it can appear that you're specifying the source for the project - but in reality you may not be.

I thought that issue with the project not building had to be fairly simple, still it is a relief to have it resolved.

Once the build completes I'll return to trying to figure out why my new plugin doesn't run without error.

First test will be moving the plugin to Apps - same as @Prz42
« Last Edit: February 07, 2017, 06:41:51 PM by VeeDub »

Re: RegHiveLoad - Failed to load registry hive
« Reply #10 on: February 07, 2017, 07:36:19 PM »

Prz42

  • Code Baker
  • Chef
  • ***
  • Date Registered: Jan 2014
  • Posts: 431
Also you must have the Source Directory and the Project on the same drive.
Are you sure.
 Source Directory and Project Directory not required on the same drive, no report yet.
   If there is such a case, open a topic for this, providing all info.

:turtle:
I tried moving the Source files to different drive and had no problems.
That is good to know.  Thanks Lancelot.   :thumbsup:

Re: RegHiveLoad - Failed to load registry hive
« Reply #11 on: February 07, 2017, 07:49:55 PM »

VeeDub

  • Jr. Chef
  • **
  • Date Registered: Feb 2014
  • Posts: 60
The answer was not the location of the plugins but

Quote
Reminder 1:
Use or test plugins under your project folder.
On builder tree, do not test or run plugins under "MyPlugins Direct"

Re: RegHiveLoad - Failed to load registry hive
« Reply #12 on: February 09, 2017, 03:13:41 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7386
I put all my plugins @ D:\Builder\Projects\MyPlugins_Direct\Apps
I do not advice that.
I put a
Reminder 3:
http://theoven.org/index.php?topic=1208

Re: RegHiveLoad - Failed to load registry hive
« Reply #13 on: February 09, 2017, 03:15:02 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7386
The answer was not the location of the plugins but

Quote
Reminder 1:
Use or test plugins under your project folder.
On builder tree, do not test or run plugins under "MyPlugins Direct"


I put pictures to Reminder 1:
 :thumbsup:

 

Powered by EzPortal