Old 3rd February 2011, 09:09   #1
steph0815
Junior Member
 
Join Date: Feb 2011
Posts: 4
Question [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
Attached Files
File Type: nsi 3D_IVDS.nsi (7.2 KB, 122 views)

Last edited by steph0815; 3rd February 2011 at 12:00.
steph0815 is offline   Reply With Quote
Old 3rd February 2011, 09:14   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
RequestExecutionLevel admin.

Stu
Afrow UK is offline   Reply With Quote
Old 3rd February 2011, 09:57   #3
steph0815
Junior Member
 
Join Date: Feb 2011
Posts: 4
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
steph0815 is offline   Reply With Quote
Old 3rd February 2011, 10:54   #4
steph0815
Junior Member
 
Join Date: Feb 2011
Posts: 4
Unhappy

Oh i forgott the file, sorry!

greetz
Steph0815
Attached Files
File Type: nsi 3D_IVDS.nsi (7.7 KB, 81 views)
steph0815 is offline   Reply With Quote
Old 3rd February 2011, 11:33   #5
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
Originally Posted by steph0815 View Post
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.
MSG is offline   Reply With Quote
Old 3rd February 2011, 11:59   #6
steph0815
Junior Member
 
Join Date: Feb 2011
Posts: 4
Thumbs up

Hello,

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

greetz
steph0815 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump