Old 31st August 2017, 15:00   #1
bybyby
Junior Member
 
Join Date: Aug 2017
Posts: 3
Installation successful/uninstall failed

I am using Windows 10 Pro.

Previously working setup now does not work. Installation successful but uninstall failed. I think that is after Windows 10 Creators Update.

Does anyone have an idea?
bybyby is offline   Reply With Quote
Old 31st August 2017, 18:44   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,591
No, we have no idea and you provided so little information so there is no point for me to try to guess.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 31st August 2017, 20:19   #3
bybyby
Junior Member
 
Join Date: Aug 2017
Posts: 3
Uninstall section...

code:

SilentUnInstall silent
Section "Uninstall"
SetDetailsPrint textonly
DetailPrint "Türkçe Yama kaldırılıyor..."
SetDetailsPrint none
Banner::show "$\n${OYUNADI} Türkçe Yama kaldırılırken lütfen bekleyin."
ReadRegStr $INSTDIR HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${REG}" "Home"
SetShellVarContext all
Delete "$SMPROGRAMS\${OYUNADI} Türkçe\${OYUNADI} Türkçe Yama Kaldır.lnk"
Delete "$SMPROGRAMS\${OYUNADI} Türkçe\${OYUNADI}.url"
Delete "$SMPROGRAMS\${OYUNADI} Türkçe\Oku.lnk"
${un.DirState} "$SMPROGRAMS\${OYUNADI} Türkçe\" $R0
StrCmp $R0 "0" 0 +2
RMDir "$SMPROGRAMS\${OYUNADI} Türkçe"
${un.DirState} "$SMPROGRAMS\${OYUNADI} Türkçe" $R0
StrCmp $R0 "0" 0 +2
RMDir "$SMPROGRAMS\${OYUNADI} Türkçe"
SetShellVarContext current


Delete "$INSTDIR\DataPC.forge"
Rename "$INSTDIR\DataPC.forge.bkp" "$INSTDIR\DataPC.forge"

Delete "$INSTDIR\dlc_20\DataPC_20_dlc.forge"
Rename "$INSTDIR\dlc_20\DataPC_20_dlc.forge.bkp" "$INSTDIR\dlc_20\DataPC_20_dlc.forge"


DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${REG}"
Delete "$INSTDIR\oku.exe"
Delete "$INSTDIR\${OYUNADI} Türkçe Yama Kaldır.exe"
RMDir /r "$PROGRAMFILES\${OYUNADI} Türkçe"

Banner::destroy
MessageBox MB_ICONINFORMATION "${OYUNADI} Türkçe Yama bilgisayarınızdan başarıyla kaldırıldı!"
SectionEnd

Function .onGUIEnd
Delay::Free
NotifyIcon::Icon "r"
AnimGif::stop
FunctionEnd

Function OnUserAbort
Delay::Free
NotifyIcon::Icon "r"
AnimGif::stop
FunctionEnd

bybyby is offline   Reply With Quote
Old 31st August 2017, 23:30   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,591
And does not work means what exactly? Is it able to delete anything at all? And you don't normally have to read $InstDir from the registry...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 1st September 2017, 07:55   #5
bybyby
Junior Member
 
Join Date: Aug 2017
Posts: 3
Problem solved. Working codes;

code:

SilentUnInstall silent

Section "Uninstall"
ClearErrors
${If} ${RunningX64} # if windows x64
SetRegView 64
ReadRegStr $R0 HKLM ${GAMEREG}
${Else}
SetRegView 32
ReadRegStr $R0 HKLM ${GAMEREG}
${EndIf}

SetDetailsPrint textonly

DetailPrint "Türkçe Yama kaldırılıyor..."

SetDetailsPrint none

Banner::show "$\n${OYUNADI} Türkçe Yama kaldırılırken lütfen bekleyin."

ReadRegStr $INSTDIR HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${REG}" "Home"

SetShellVarContext all

Delete "$SMPROGRAMS\${OYUNADI} Türkçe\${OYUNADI} Türkçe Yama Kaldır.lnk"

Delete "$SMPROGRAMS\${OYUNADI} Türkçe\${OYUNADI}.url"

Delete "$SMPROGRAMS\${OYUNADI} Türkçe\Oku.lnk"

${un.DirState} "$SMPROGRAMS\${OYUNADI} Türkçe\" $R0

StrCmp $R0 "0" 0 +2

RMDir "$SMPROGRAMS\${OYUNADI} Türkçe"

${un.DirState} "$SMPROGRAMS\${OYUNADI} Türkçe" $R0

StrCmp $R0 "0" 0 +2

RMDir "$SMPROGRAMS\${OYUNADI} Türkçe"

SetShellVarContext current





Delete "$INSTDIR\DataPC.forge"

Rename "$INSTDIR\DataPC.forge.bkp" "$INSTDIR\DataPC.forge"



Delete "$INSTDIR\dlc_20\DataPC_20_dlc.forge"

Rename "$INSTDIR\dlc_20\DataPC_20_dlc.forge.bkp" "$INSTDIR\dlc_20\DataPC_20_dlc.forge"





DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${REG}"

Delete "$INSTDIR\oku.exe"

Delete "$INSTDIR\${OYUNADI} Türkçe Yama Kaldır.exe"

RMDir /r "$PROGRAMFILES\${OYUNADI} Türkçe"



Banner::destroy

MessageBox MB_ICONINFORMATION "${OYUNADI} Türkçe Yama bilgisayarınızdan başarıyla kaldırıldı!"

SectionEnd



Function .onGUIEnd

Delay::Free

NotifyIcon::Icon "r"

AnimGif::stop

FunctionEnd



Function OnUserAbort

Delay::Free

NotifyIcon::Icon "r"

AnimGif::stop

FunctionEnd

bybyby 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