Solved

IS Express Uninstall Problem

Posted on 1997-11-14
4
127 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

910 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now