Solved

IS Express Uninstall Problem

Posted on 1997-11-14
4
131 Views
Last Modified: 2010-04-04
I'm using IS Express for Delphi 2 and am testing the unistallation of one of my products. In my database application, I create all of the indexes and Ref-Integ teh first time teh user starts teh program to make the disks/single exe files smaller.  The problem is, once the unistall is completed, the indexes (actually any file not part of the setup list) and the directory as a whole still exist.  How do I get IS Express to delete all files & the entire directory?  I really dont hav the space on my disks to create my own uninstall program.
0
Comment
Question by:d4jaj1
  • 2
4 Comments
 

Accepted Solution

by:
jhersk earned 50 total points
ID: 1350498
You must write a DLL in Delphi that deletes the files, directories, and registry entries that were created by your application.  The DLL must export 2 procedures, named UninstInitialize and UninstUninitialize.  The first runs at the beginning of the uninstall, the 2nd at the end.  This will be pretty small, maybe 50KB or so.

You may want to compile this as an exe to test it, then compile it as a DLL after debugging.  When you install your app, put the DLL in the main app directory.

Then, you have to modify the Uninstall command line in the Windows registry.  You will add
"-c" plus the name of your DLL to the existing command line.  You will find the command line under
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\<Your_app>

This is kind of tricky to debug because you can't trace the DLLs execution with the Delphi debugger, so you may want to have your DLL display a dialog or write to a file so you can see that it's being called.

Good luck!
0
 
LVL 3

Author Comment

by:d4jaj1
ID: 1350499
I've never writen a DLL before. I assume there's some function in Delphi that will 1) do something like ERASE *.* 2) then some function to remove Registry entries and 3) delete itself.  What are those functions?  I think if I knew them, I could probably figure out how to create a form based DLL in Delphi. Thanks
0
 

Expert Comment

by:jhersk
ID: 1350500
I'm away from my office (actually on a 5 month leave of absence) so I don't have access to my Delphi manuals.  There's a TRegistry object that lets you erase registry entries, I don't remember the method for erasing files.

To create a DLL, select File/New/DLL.  It's just like a unit except it says library at the top.  Select Project/Options and specify the extension DLL for the executable.  This is all in the manual.

Good luck.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1350501
1) you can iterate for all the files off the given extension of the know path (FindFirst, FindNext). and delete the file with Deletefile.
2) Why don't you make you're registry entries in IS Express? But you can delete a registry key with DeleteKey.
3) Well, that I don't know ....
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi and Access based Enumeration 9 70
Dev express lookupcombo 3 35
scroll down TListBox component in Delphi 1 19
Delphi android app hide keyboard 3 16
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question