Solved

IS Express Uninstall Problem

Posted on 1997-11-14
4
133 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

705 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