Old 12th September 2010, 00:11   #1
thanatos83
Junior Member
 
Join Date: Dec 2009
Posts: 29
using rollback with "CABsetup.dll"

HI all.

I need a little help with this plugin, because this work for me fine but i need to set a nice script with rollback issue.

I wish to delete the rest of files installed and remove some registry as entries in Add/remove programs, etc...

well i get to delete files but the entry in "add/remove programs" it isn't removed.

this is my part of script with that:

PHP Code:
# Rollback
# ===============================
Function Abortar            
    DeleteRegKey HKLM 
"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"
    
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\$(^UninstallLink).lnk"
    
Delete "$DESKTOP\STR.lnk"
    
Delete "$QUICKLAUNCH\STR.lnk"
    
Delete /REBOOTOK $INSTDIR\uninstall.exe
    DeleteRegValue HKLM 
"${REGKEY}StartMenuGroup
    DeleteRegValue HKLM 
"${REGKEY}Path
    DeleteRegKey 
/IfEmpty HKLM "${REGKEY}\Components"
    
DeleteRegKey /IfEmpty HKLM "${REGKEY}"
    
RmDir //REBOOTOK $SMPROGRAMS\$StartMenuGroup
    RmDir 
//REBOOTOK $INSTDIR
    DeleteRegValue HKLM 
"${REGKEY}\Components" BaseFiles
    Push $R0
    StrCpy $R0 $StartMenuGroup 1
    StrCmp $R0 
">" no_smgroup
no_smgroup
:
    
Pop $R0  
FunctionEnd 
Well this script is copied from uninstaller section, i think this is correct if i wish to delete files and install a new clean installation again.
thx.
thanatos83 is offline   Reply With Quote
Old 12th September 2010, 07:28   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Are you sure you don't just need to refresh ARP?
MSG is offline   Reply With Quote
Old 12th September 2010, 10:08   #3
thanatos83
Junior Member
 
Join Date: Dec 2009
Posts: 29
Quote:
Originally Posted by MSG View Post
Are you sure you don't just need to refresh ARP?
How can i do this?, so i forgive mention that the shortcut not removed :S
thanatos83 is offline   Reply With Quote
Old 12th September 2010, 12:42   #4
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Just press F5 in ARP. If an uninstaller is called from ARP, it automatically refreshes afterwards. If you're looking at ARP while some other application removes the registry entry, you may have to do a manual refresh.
MSG is offline   Reply With Quote
Old 12th September 2010, 13:21   #5
thanatos83
Junior Member
 
Join Date: Dec 2009
Posts: 29
HI MSG.

OK i press it, but not working and i see the shortcut in desktop. So i need to do manually but how can i do manually?

thanks.
thanatos83 is offline   Reply With Quote
Old 12th September 2010, 13:28   #6
thanatos83
Junior Member
 
Join Date: Dec 2009
Posts: 29
HI MSG.

OK i press it, but not working and i see the shortcut in desktop. So i need to do manually but how can i do manually?

Note: this is the part of the script that i can handle the cancel button.

PHP Code:
Handle case where extraction was cancelled.
    ${If} 
$R0 995        
        Call Abortar
        DetailPrint 
"Extract process was cancelled"
        
SetDetailsPrint None        
        
Goto Done
    
${EndIf}

    
DetailPrint "Extract failed with error code $R0"
    
Done
thanks.
thanatos83 is offline   Reply With Quote
Old 13th September 2010, 14:41   #7
thanatos83
Junior Member
 
Join Date: Dec 2009
Posts: 29
Hi.

Not working by pressing F5 or exit and going after to ARP. :S

So other files are removed but other files as "uninstall.exe, shortcuts, that entry in ARP" not removed. If i set abort this does work but i need to press cancel button twice to exit.
thanatos83 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