Archive: Problem in Un-installing.


Problem in Un-installing.
Hi all,

I can see the add/remove program list being updated with "my app" after the installion.
When Trying to remove an install "my app" using Add/Remove programs, I get:
"An error occurred while trying to remove .....
it may have already been uninstalled. Would you like to remove it?"
I have the right path and EXE file written to the registry in the uninstall entry.
Here is the code:

WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MYAPP" "DisplayName" $(PRODUCT_KEY)
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MYAPP" "UninstallString" '"$SYSDIR\Clean.exe"'

uninstall:
DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" $(PRODUCT_KEY)

But the above error still occur.
Can anyone help me in figuring the problem?

Thanks with Regards,
VCR


i think, you are using too much inverted commata:

'"$SYSDIR\Clean.exe"'
try this instead:
"$SYSDIR\Clean.exe"
also, i'd rather copy the uninstaller to the installation directory, than to the system directory.