Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

RegDBSetKeyValueEx failed


5 replies to this topic

haroldxious

haroldxious
  • Full Members
  • 70 posts

Posted 22 May 2007 - 06:17

i have a CA which is run after a button is clicked..and thtat CA is an immediate custom action. That CA writes in the registry LOCAL_MACHINE but in vista it is an error.

i have tried to make the property of CA to be deffered in system contex but oviously it wont work.

any help would do.

CA
immediate
*called after a button click
CA writes on registry using RegDBSetKeyValueEx.



Thank you in advance

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 22 May 2007 - 20:23

If you really need to use a custom action to write to the registry (why?) and if you really need to do it in the UI sequence (why?) then you must elevate the whole install, by launching it using setup.exe.

haroldxious

haroldxious
  • Full Members
  • 70 posts

Posted 23 May 2007 - 04:56

in my installers maintenance dialog, there are 3 options
1. Modify
2. Delete
3. Port Change (initial port values are in LOCAL MACHINE/software/MyProduct)

This port change, lunches an executable file that ask the user to input new ports, then the exe will write the inputted ports in the CURRENT USER, then i will copy it and overwrite the values in the LOCAL MACHINE.

in doing this i used custom action to do the copying of the values from CURRENT USER to LOCAL MACHINE, but unfortunately in vista it doesent work.

Is there any other way to write in doing this in vista. Or is there any other way of writing in the registry not using custom action..

I need your help in this matter, and if there is no way of doin this is there any documentations that will support.

Thank you very much in advance

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 23 May 2007 - 14:27

In general, you should use the Registry view to write to the registry. The new vakue should be written when you perform the reinstall/repair. So your third button would do the same as the Repair button, plus change the property which gets written to the registry.

If a custom action is needed, then you should call it in the Execute sequence, make it deferred in system context between InstallInitialize and InstallFinalize. Add a complimentary Rollback action, too.

haroldxious

haroldxious
  • Full Members
  • 70 posts

Posted 30 May 2007 - 10:40

if i will make it on the repair/ reinstall mode, is it possible that i will not display the progress status text? i will just display 1 text is it possible?

or can it be the progress dialog will not be seen?

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 31 May 2007 - 17:18

Not sure which text you are talking about but you can modify the progress bar if your setup runs in full UI mode.