Solved

IS Express Uninstall Problem

Posted on 1997-11-14
4
124 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 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

13 Experts available now in Live!

Get 1:1 Help Now