We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

F.J
Posts: 8
Joined: Tue Apr 14, 2015 10:19 am

registry edits wont work

hello,

i am trying to add registry edits to my installer package bud when i try to install it the registry edits are not done. ( for example turning the screensaver off)
this is how i did it:
1) resources -> registry
2) add key -> HKEY_CURRENT_USER\Control panel\desktop -> OK
3) doubleclick on ScreenSaveActive -> changed data from 1 to 0 and let the rest as default -> ok
4) save changes and build the installer

when i do it the way as shown above and i install my project the regedits are not being done. how is this possible?
i have searched on the website bud i was unsuccesfull at finding the solution.
link i have used to search for a solution: http://www.advancedinstaller.com/user-g ... istry.html

thanks in advance,

F.Jansen
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: registry edits wont work

Hi Jansen and welcome to Advanced Installer forums,

If you need to add registry keys and values to your package, please follow the steps from the Add Registry article.

Please let me know if that helped, otherwise give me more details about your specific scenario maybe exemplify.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
F.J
Posts: 8
Joined: Tue Apr 14, 2015 10:19 am

Re: registry edits wont work

hello,

i need to change some settings in windows like the screensaver settings.
i want to disable the screensaver since it is required that the screen stays on.
in order to do this during the installation i want to use a register function to accomplisch that.
i have never used the register before and am not able to get a register edit working.

there is already an existing value called "ScreenSaveActive" ,data is set 1 as default which means the screensaver is active.
when i set the data value to 0 and include it in the installer and i install it on a different computer is does not change the value in the register on that computer ( with administrator rights )
i have tried to use the link you gave me bud it doesnt help me. i dont have a clue how i can make it work, i dont know where to put the new values and if i need to link them to the existing value. i truly have to start from scratch with this. is there a step by step guide on how to make a register edit working with advanced installer? i have tried a lot of things to get it working bud it just isnt happening :(
normally i dont need a step by step guide for things bud with this i do need one. preferably from A to Z. there is one thing i unintentionally managed when it came to editing the register and that was erasing a part of it :lol:

note: i also made a test value to see if it is added to the register when i run the installer, it is not being added so i must be doing something wrong bud dont know what.

F.J
F.J
Posts: 8
Joined: Tue Apr 14, 2015 10:19 am

Re: registry edits wont work

hello,

i got the problem solved, i formulated the path to it's destination the wrong way.
it is working just fine now :D

bud i do have another question now, when i unistall the program it also deletes the registry edits that were done by the installer. how can i get them back to their default value? do i need to add extra registry edits to the installer that will be applied when i uninstall the program? or is there another/ nicer way to do it?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: registry edits wont work

Hello Frank,

I'm very sorry for our delayed reply. Your last question has been somehow overlooked.

Please keep in mind this is the normal Windows Installer behavior when "Replace the existing value" option is used in "Registry" page for your registry value. The overwritten (at install time) registry value will be deleted on uninstall.

To restore the original registry value on uninstall you should use a custom approach.
1. First you should use a registry search (MY_SEARCH_PROP) which will search for the original value at install time. The search result will be stored in the search name (which is a property: MY_SEARCH_PROP).
2. Then you should create on "Registry" page a new registry value (backup_reg) which will store the value of "MY_SEARCH_PROP" property.
3. Next you should add another registry search (BACKUP_PROP) which will search for the "backup_reg" value. The search will succeed on uninstall.
4. Finally, you should create your own custom action which will write the value of "BACKUP_PROP" property in the desired registry value on uninstall. The custom action should be added as deferred after "Install Execution Stage -> Remove Resources" action group, so it will run after the installed registry value is removed.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”