I can't uninstall some files
I have this problem for a very long time and I can't understand why I can't uninstall some RegKeys or RegValues, all seems o be OK, I can't do better, what is wrong with my code ??
<code>
Section "Uninstall"
${un.TrimNewLines} "Last line$\r$\n" $R0
; $R0="Last line"
SendMessage ${HWND_BROADCAST} "RegisterWindowMessage(TEXT('Message : Kill CMD')" "MAKEWPARAM(0, 0)" "MAKELPARAM(0xbaad, 0xf00d)"
; let's stop
nsExec::Exec 'net stop "Serv"'
${If} ${RunningX64}
nsExec::Exec '$INSTDIR\x64\lotsvc.exe -re'
${Endif}
${If} ${RunningNT51}
nsExec::Exec '$INSTDIR\x86-NT5.1\lotsvc.exe -re'
${Else}
nsExec::Exec '$INSTDIR\x86-NT5.2\lotsvc.exe -re'
${Endif}
; first let's get ride of all the files
; remaining DLLs to clear after reboot...
rmdir /R /REBOOTOK $INSTDIR
; and then let's get rid of the links
Delete "$SMPROGRAMS\lot\lot.lnk"
Delete "$SMPROGRAMS\lot\Uninstall.lnk"
Delete "$SMPROGRAMS\lot\Up status.lnk"
Delete "$SMPROGRAMS\lot\lot Conf"
RMDir /R "$SMPROGRAMS\lot"
; Cleanup registry
DeleteRegKey HKLM "SOFTWARE\lot"
DeleteRegKey HKLM "SOFTWARE\lot\FiBack\S-1-0-0"
; Cleanup few more stuff
Delete "$INSTDIR\uninstall.exe"
;RMDir "$INSTDIR"
DeleteRegKey /ifempty HKCU "Software\Modern UI Langage"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\lot"
; let's remove the autorun entry as well
; values don't erase... BUG TO FIX
DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "lot"
IfErrors 0 +2
MessageBox MB_OK "DeleteRegKey1 failed"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{6D05AFFE-F04C-479f-B445-A8512F4C86EB}"
IfErrors 0 +2
MessageBox MB_OK "DeleteRegKey2 failed"
DeleteRegValue HKCR "directory\shellex\ContextMenuHandlers\lot Sauveg" "{6D05AFFE-F04C-479f-B445-A8512F4C86EB}"
IfErrors 0 +2
MessageBox MB_OK "DeleteRegKey3 failed"
DeleteRegValue HKCR "*\shellex\ContextMenuHandlers\lot Sauveg" "{6D05AFFE-F04C-479f-B445-A8512F4C86EB}"
IfErrors 0 +2 ...
...
... DeleteRegValue HKLM "Software\lot" "LastRestart"
DeleteRegKey HKCU "Software\lot"
SectionEnd
</code>
The error messages never appear, the uninstaller seems to never read those lines, I tried to put them at the begining of the uninstall section but it doesn't change anything.
Thank you for your help ...