[wpkg-users] InnoSetup Uninstall

le dahut le.dahut at laposte.net
Wed Dec 9 17:45:29 CET 2009



Falko Trojahn wrote :
> Bonjour!

Yes, you're right ! I wrote this mail at the end of a long day so 
forgive me omitting this rules of polite society.

>>> I'm testing WPKG, I'm very happy with it but I've a little problem :
>>> every InnoSetup doesn't uninstall correctly.
>>> With "/VERYSILENT /NORESTART" or only with "/VERYSILENT" I get "exit
>>> code=1". After this failed uninstall, only the file "unin000.exe" is
>>> present in the application directory (%PROGRAMFILES%\myapp").
>>>
>>> I thought it was a code to reboot but InnoSetup help says :
>>> """
>>> Beginning with Inno Setup 4.0.8, the uninstaller will return a
>>> non-zero exit code if the user cancels or a fatal error is encountered.
>>> """
>>> so "1" is indicates uninstall has failed.
>>>
>>> If I run it manually via command line I get exit code = 0.
>>>
>>> Any idea ?
>>>
>>
>> I've build my own InnoSetup .exe file using one of the examples
>> shipped with InnoS. The result is the same : if I run the uninstall
>> manually it returns 0 as exit codes and if I run it via WPKG it
>> returns 1 as exit code.
>>
> If your check(s) work(s) correct and the software is really uninstalled
> - don't care.
> 
> Others even use 'exit code="any"':
> 
> http://wpkg.org/R
> 
> Regards,
> Falko
> 
> 
>

InnoSetup says :
"""
Because Windows doesn't allow programs to delete their own EXEs, the 
uninstaller creates and spawns a copy of itself in the TEMP directory. 
This "clone" performs the actual uninstallation, and at the end, 
terminates the original uninstaller EXE (at which point you get an exit 
code back), deletes it, then displays the "uninstall complete" message box
"""

The problem is that the file "unin000.exe" is not deleted at the end of 
uninstall.
I think the "exit code = 1" reflects that.

The side effect of this is that next time the application is installed, 
it will generate an "unin001.exe" file (because a unin000.exe already 
exists). And every time the app is installed/uninstalled it generates 
"unin<prec_unin_number +1>.exe".

This makes next uninstall fail because "unin000.exe", as specified in 
the "remove" section, is not the real uninstaller.

Since some applications are updated by :
* uninstall old version
* install new version
It should be better if the uninstall process returns 0


I've written a service that runs under SYSTEM account. It succeeds in 
installing/uninstalling InnoSetup apps with exactly the same command 
line as in <package>.xml.

Is it possible that WPKG puts its own lock on "unin000.exe" preventing 
it to be erased ?





More information about the wpkg-users mailing list