delete不起作用 nsis_NSIS卸载程序不会删除文件/文件夹

我正在为其中一个应用程序编写一个NSIS安装程序,这个应用程序在内部使用,安装过程正常,没有任何问题会创建所有REG密钥,并且App使用的文件夹和服务也是如此。出于某种原因,我无法理解,卸载过程不起作用。NSIS卸载程序不会删除文件/文件夹

该应用程序创建的服务被删除,注册表项也是如此,最简单的部分,文件本身,我无法通过卸载程序删除它们!

#Includes

!include "x64.nsh"

#Defines and Installer Properties

Outfile "ESTvnc Installer.exe"

Name ESTvnc

Icon "${NSISDIR}\contrib\graphics\icons\VNCON.ico"

#Detect OS Version

Function .onInit

StrCpy $instdir $PROGRAMFILES

${If} ${RunningX64}

StrCpy $instdir $PROGRAMFILES32

${EndIf}

FunctionEnd

section

SetShellVarContext all

CreateDirectory $instdir\EST\ESTvnc

setOutPath $instdir\EST\ESTvnc

File /r installfiles\*

WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ESTvnc\" \

"DisplayName" "ESTvnc"

WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ESTvnc"\

"UninstallString" "$instdir\EST\ESTvnc\uninstaller.exe"

writeUninstaller $instdir\EST\ESTvnc\uninstaller.exe

ExecWait '"$instdir\EST\estvnc\estvnc.exe" -install'

sectionEnd

section "Uninstall"

SetShellVarContext all

SimpleSC::StopService "ESTVNC" 1 30

pop $0

SimpleSC::StopService "ESTVNCSR" 1 30

pop $0

SimpleSC::RemoveService "ESTVNC"

SimpleSC::RemoveService "ESTVNCSR"

RMDir /r "$instdir\EST\ESTvnc"

Delete $instdir\EST\ESTvnc\uninstaller.exe

DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ESTvnc"

sectionEnd

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值