Old 4th May 2011, 20:31   #1
WoodyOne4U
Junior Member
 
Join Date: May 2011
Posts: 2
Uninstall Delete $SMPrograms failing

Ok... I've seen many threads on here that almost touch on this subject, or almost give an answer, but I'm still at a loss. I am creating Start Menus just fine as follows:

CreateDirectory "$SMPROGRAMS\Folder"
CreateShortCut "$SMPROGRAMS\Folder\File.lnk" "$INSTDIR\File.exe"

However, when I run the Uninstaller, it does everything just fine EXCEPT deleting these shortcuts and the Directory. Here is my script:

Delete "$SMPROGRAMS\Folder\*.*"
RMDir /r "$SMPROGRAMS\Folder"

I've also tried:

Delete "$SMPROGRAMS\ESP Vision\File.lnk"
RMDir /r "$SMPROGRAMS\ESP Vision"

I don't think it is a privilege thing, since I am the only user on this computer, and I have administrative priviliges. Oh, this is Win 7 32-bit, in case that matters.

I've used almost identical scripting on another file that worked fine... albeit was on Win XP. Any ideas to help?

Last edited by WoodyOne4U; 4th May 2011 at 21:06. Reason: Remove sensitive data
WoodyOne4U is offline   Reply With Quote
Old 4th May 2011, 20:48   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Searched Google for "shortcut delete nsis" :
http://nsis.sourceforge.net/Shortcut..._Windows_Vista

Stu
Afrow UK is offline   Reply With Quote
Old 4th May 2011, 21:04   #3
WoodyOne4U
Junior Member
 
Join Date: May 2011
Posts: 2
Thanks... I didn't think about it being a Vista + Win 7 thing... When I googled, I only looked for Win 7.
WoodyOne4U is offline   Reply With Quote
Old 5th May 2011, 23:45   #4
EricTBoneJackson
Junior Member
 
Join Date: May 2011
Posts: 1
Same issue here

I ran into this yesterday myself. I tried both the solutions on that wiki page.

The first one (RequestExecutionLevel user) worked great on my machine (Windows 7 Professional 64-bit). It failed miserably on my coworker's machine (also Win7 Pro 64). It installed only the shortcuts. No files, no registry keys, nothing but the shortcuts.

What's worse is that it fails silently. That seems totally unforgivable for an installer package. Is there some flag I can set to prevent that? I'd rather the installer abort with flashing lights and sirens than look as if it installed our application when it didn't.

The second option (RequestExecutionLevel admin) works on both our machines, but I don't know what's supposed to go in "TODO" section. I check that the user has admin rights. What if he doesn't? Do I just abort?
EricTBoneJackson is offline   Reply With Quote
Old 6th May 2011, 04:53   #5
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
Originally Posted by EricTBoneJackson View Post
I check that the user has admin rights. What if he doesn't? Do I just abort?
Yes, you can throw a MessageBox and then call Quit.

As for it not working on your coworker's PC, you probably didn't have access rights to create the files and regkeys. At userlevel, you cannot write to $PROGRAMFILES or HKLM. You need to write to $LOCALAPPDATA and HKCU.
MSG is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
$smprograms, delete, uninstall

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