"Could not be opened by RegCreateKeyEx"

Antworten
bobzbobz
Beiträge: 169
Registriert: 30 Nov 2012, 10:41
Wohnort: Denmark

"Could not be opened by RegCreateKeyEx"

Beitrag 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
Benutzeravatar
d.oertel
uib-Team
Beiträge: 3319
Registriert: 04 Jun 2008, 14:27

Re: "Could not be opened by RegCreateKeyEx"

Beitrag 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
opsi support - uib gmbh

For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
bobzbobz
Beiträge: 169
Registriert: 30 Nov 2012, 10:41
Wohnort: Denmark

Re: "Could not be opened by RegCreateKeyEx"

Beitrag 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
bobzbobz
Beiträge: 169
Registriert: 30 Nov 2012, 10:41
Wohnort: Denmark

Re: "Could not be opened by RegCreateKeyEx"

Beitrag 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?
bobzbobz
Beiträge: 169
Registriert: 30 Nov 2012, 10:41
Wohnort: Denmark

Re: "Could not be opened by RegCreateKeyEx"

Beitrag 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.
Antworten