Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preventing Multiple Install Instances

Status
Not open for further replies.

TheDrParker

Programmer
Nov 21, 2001
55
US
I noticed that when I create a setup package (using VB6) it works fine if I install it again and again. However, when I go to delete it shows multiple instances of the application. How do I prevent this?
 
Ive lost count of the number of times people ask this question!
Put this in the very first load routine that runs:
If App.PrevInstance = True Then
MsgBox "You already have a copy of MyPROGRAM.EXE running!", 16, ""
End
End If
and you wont be able to load more than one copy
 
Actually the problem is that if I do 3 installs when I go to Add/Remove Programs I see:

MyTestProg
MyTestProg(C:\Program Files\MyProgDir)
MyTestProg(C:\Program Files\MyProgDir)#3

What is the best way to prevent this?
 
Why are you doing 3 installs, if I may ask? What I normally do, if I change something is just to copy over the new .exe that I need. I would just try to copy over the files you need. Maybe write a file replace app or something if you really want to do it effeciently.
 
I have applications that are in use by several people and sometimes I do updates to the applications that include adding new components, DLL's, etc. Since I have to rebuild the package I have to do a reinstall on the machines of users or more likely I have them do one, causing this situation to occur.

Thanx
Dr. Parkenstein
 
I downloaded Visual Studio Installer thanks. I'll try it out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top