Archive: Problem with uninstall REGKEYS and startmenu files


[solved] Problem with uninstall REGKEYS and startmenu files
Hello,

I'm new in using NSIS to create a installer. I started with some tutorials and it worked fine. So I decided to use NSIS for my further projects to create a installer. The first projects where plain projects, just copy some files and thats it.

Now I have a project with a client and a server application. Only one application should be installed. Therefore I created a "components page" with 2 insttypes. Afterwards I defined the sections for each. That works fine.
My problem is in the uninstall section. Here I try to delete the regkeys and startmenu files. The uninstall regkeys are deleted also the files on the harddrive. The problem is the regkey in the "run" environment of the registry and all startmenu files.
After looking through the search I found the solution with "RequestExecutionLevel user". I tried it but it didn't worked.

I attached the complete file, so if someone can help me I will appreciate this!

greetz
steph0815


RequestExecutionLevel admin.

Stu


THX for the quick help.
This solves half of my problem. Now it deletes all startmenu entries. But the registry entry for autorun is still not deleted. Mayb there is some other problem.
Beside the "RequestExecutionLevel admin" I added a part to check if the user is really a admin in the .onInit function. I added the enhanced code here.

greetz
Steph0815


Oh i forgott the file, sorry!

greetz
Steph0815


Originally posted by steph0815
Beside the "RequestExecutionLevel admin" I added a part to check if the user is really a admin in the .onInit function. I added the enhanced code here.
Very good, that's indeed a necessary step.

As for your problem, you write a regstr and try to delete a regkey. You should use DeleteRegValue, not DeleteRegKey.

Hello,

THX that was the reason why it didnt worked. Now its working fine!

greetz