Solved

IS Express Uninstall Problem

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 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