문제

I created an window application for which I need to create setup.For creating setup i am using NSIS. I had written script to create setup file I need to link this setup file to Add/remove program. For add link to add/remove program I am using following code:

 WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\appName" "DisplayName" "Name"
 WriteRegExpandStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\appName" "AppName" '"$INSTDIR\UninstallApp.exe"'

To delete the link from add/Remove program I am using following code :

 DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\appName"

But this is not working.

도움이 되었습니까?

해결책

Except for the fact that "AppName" is wrong and should be "UninstallString" it looks like the code should work.

You should inspect it with Process Monitor and see why the delete fails. My only guess at this point is that your real code has a typo...

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top