Archive: Uninstalling MSI Package


Uninstalling MSI Package
Hi all,

am new to this NSIS Installer and i find it really interesting.......hmm...nice scripting..hey , am finding some difficulty in removing an MSI package....i did an application in .NET and created a Setup which ofcourse in .msi format.....my nsis executes that installer...and when my nsis setup performs uninstalling,the .NET application also has to be removed....i got a sample in Archive of how to remove an msi package....but for me it is not working!.......

the product id of the installer , it was there in the properties of the Setup Project and i passed it..but nothing is happening....is the Archive code correct?

with regards,
C.C.Chakkaradeep


Have you tried both of the examples (#1 #2)?


Hi,

i got the second code working "#2".......but it is not working in Uninstall section!!!........the error it gave was,

"Function call can be called only in un. functions"

so i added tha following code,

****************Code Starts here*************************
Function un.OnInit
push $R0
StrCpy $R0 "{7AB4EAF7-F6D0-4D7C-BBD2-94612D8F1A65}"
Call UninstallMSI
FunctionEnd
****************Code ends here*************************

even then am getting an error stating that usage of the function call is wrong??...

whats the error??

with regards,
C.C.Chakkaradeep


As the error says, names of functions that are called in the uninstaller must be prefixed with "un.".