Page 1 of 1

Simple uninstall

Posted: Mon Feb 26, 2007 7:45 pm
by djm
I don't want to give the maintenance screen at uninstall, so I just modified a version of the startinstallation dialog into startuninstallation and then commented out the maintenance and componentstree "display dialog"'s in the "label: Maintenance" block and simply called the new startuninstallation dialog.

But now when I use the uninstall shortcut in the Program group, the uninstaller throws up a file browser and says it's looking for the original installation source files.

1. Why would commenting those 2 dialogs generate this behavior and
2. Why would it be looking for the source of the installer if the shortcut is pointing at the single .exe installer itself??

Posted: Tue Feb 27, 2007 1:03 pm
by djm
OK, so I've accepted the need for whatever reason to keep the maintenance dialog which bypasses the above problem and I've created 2 simple options, reinstall and uninstall. That works too, however now I'm getting a runtime error that generates a segfault.

First I run the installation thru the debugger. Shift-F9 to build it and F9 to run it. that works. Then I start the install again, F9 and get the following error box:

"X Runtime error in setup script:
Line 370: Cannot open file "\\some\\path\\to\\REMOVE#MYAH$MYAH$MYAH$FALSE.dfm". The system cannot find the file specified [OK]"

After I OK that, another IA box pops up:

"X Access violation at address 0046A28F in module miae.exe. Read of address 00000188."

After I OK that, IA is in some midstate where I can't do anything.
If I even try to close IA, I get a message box:

"? You must stop debugging before using this action, do you wish to stop debugging now [YES] [NO]"

No matter what I choose, debugging doesn't stop and I'm locked in this mode. I have to go out to the task manager and kill miae.exe there and restart.

The code it doesn't appear to like is here because the cursor is there in the debugger at the point where it dies and this is where the section for the uninstall is (though not anywhere near line 371 as mentioned in the error):

Code: Select all

~InstallAware Clipboard Data~
~End~
~{E83975BE-124D-4BC7-9F0B-FAD2CE49AE8B}~
~Display Dialog~
~{DE4C5823-9644-4D17-938B-05318D6DCEF4}~
~startuninstallation~
~WIZARD~
~TRUE~
~~
~TRUE~
~FALSE~
~Set Variable~
~{C778E3EF-5151-445A-B9A0-3CE6DFD0D87B}~
~REMOVE$MYAH$MYAH$FALSE~
~TRUE~
~Display Dialog~
~{F4D44095-8BB2-4DE1-907C-10D22CC6D7C2}~
~maintenance~
~WIZARD~
~TRUE~
~~
~TRUE~
~FALSE~
~Wizard Loop~
~{9D347994-CE22-4B9E-9FD8-325F1410AD99}~
~Comment~
~{0F9725B4-3BFA-4EED-9203-50A0DB2194E2}~
~Maintenance Install/Uninstall~
~Label~
~{50265CDB-0AEC-492F-8BB7-A721F7DD4E19}~
~Maintenance~


It appears the problem is coming from the setting of the "REMOVE" variable, but why is it reporting a missing file?? Strange.

What I want to do is show 2 options in the following order:

Uninstall
Reinstall

And default to Uninstall. I thought I had to set REMOVE=TRUE to get the
radio button to default, but it's causing the above problem. If that's not the right way to do this, what is?

Thanks.