Seite 1 von 1

"Could not be opened by RegCreateKeyEx"

Verfasst: 07 Dez 2012, 13:39
von bobzbobz
Hi

I am trying to create a package with Foxit-PDF-Reader for practise (i know you can find the code on the wiki).

I am trying to edit some REG-keys after installation:

Code: Alles auswählen

[Registry_install]
OpenKey [HKEY_CURRENT_USER\Software\Foxit Software\Foxit Reader 5.0\plugins\Updater]
set "IsAutoUpdater"="0"
set "UpdateMode"="0"
However when i test the package with "winst32" i get errors when trying to open the key.

Code: Alles auswählen

Execution of Registry_install
Error: Registry key [HKEY_CURRENT_USER\\Software\Foxit Software\Foxit Reader 5.0\plugins\Updater] could not be opened by RegCreateKeyEx,
Errorno: 161 "The path is invalid"
Error: Variable "......
Can it be the extra backslash in front of HKEY_CURRENT_USER which is causing the error? (why did it put it there? its not in the code)

I have tried installing Foxit and browsing to the key and copy the direct path. I have also set permissions on the catalog with "opsi-setup --set-rights".

Best Regards,
Soren

Re: "Could not be opened by RegCreateKeyEx"

Verfasst: 10 Dez 2012, 18:37
von d.oertel
Hi,

the HKCU Hice is part of the profile of the logged on user.
At the time you install with opsi there is (by default) no user logged on.
So in this case the opsi-winst is right: "The path is invalid".

For patching profiles (HKCU) have a look at:
http://download.uib.de/opsi_stable/doc/ ... -allntuser
or / and
http://download.uib.de/opsi_stable/doc/ ... serprofile

regards

d.oertel

Re: "Could not be opened by RegCreateKeyEx"

Verfasst: 12 Dez 2012, 09:05
von bobzbobz
Hi

I ended up with:

Code: Alles auswählen

	comment "Patcher Registry"
	Registry_AllUsers /ALLNtuserdats

Code: Alles auswählen

[Registry_AllUsers]
openkey [Software\Foxit Software\Foxit Reader 5.0\plugins\Updater]
set "IsAutoUpdater"="0"
set "UpdateMode"="0"
Thanks Oertel :)

Best Regards,
Soren

Re: "Could not be opened by RegCreateKeyEx"

Verfasst: 12 Dez 2012, 11:09
von bobzbobz
Hi again

It seems the fix didnt work completly :S

I had some leftover keys in my registry but when i uninstalled foxit and deleted the reg-keys, and then tried to install foxit again, the reg-keys from the code werent created.

Is

Code: Alles auswählen

openkey [Software\Foxit Software\Foxit Reader 5.0\plugins\Updater]
set "IsAutoUpdater"=REG_SZ:"0"
set "UpdateMode"=REG_SZ:"0"
supposed to create the nessaceary keys?

Re: "Could not be opened by RegCreateKeyEx"

Verfasst: 12 Dez 2012, 11:24
von bobzbobz
By default a installation of Foxit only creates the keys:

Code: Alles auswählen

[HKCU\Software\Foxit Software\Foxit Reader 5.0\Preferences\Others]
The "Foxit Reader 5.0\plugins\Updater"-folder/key is created when the program launches for the first time.