Results 1 to 11 of 11

Thread: [RESOLVED] seperate installation on each install

  1. #1
    Member
    Join Date
    Mar 12
    Posts
    40

    Resolved [RESOLVED] seperate installation on each install

    Hi There,
    After compile, when I install a vb6 program, it installs and works well. But due to any reason (like update or debugging), if I bring change in the code, recompile it and re-install in the same pc (with previously installed same program) without uninstalling the previous one, then there is another instance of the program and a second icon creates in the 'Add or Remove Program' list.

    But when we install a windows application such as google chrome, if we install twice, thrice or more, it overrides the previous one and only one icon is shown on 'Add or Remove Program' list.

    Then why it is not happening in case of my program?

    Any help will be appreciated.

    Thanks

  2. #2
    Fanatic Member
    Join Date
    Dec 08
    Posts
    516

    Re: seperate installation on each install

    If the changes you do whilst debugging, etc, do NOT change the dependencies, then just create the new EXE, and ask the user to replace their existing EXE

  3. #3
    PowerPoster
    Join Date
    Jan 08
    Posts
    6,775

    Re: seperate installation on each install

    During your install it is your responsibility to un-install any previous installations. If you create a VB app and make an .EXE out of it and put that .EXE in different locations then you need to delete those other .EXE's. If it is in the same directory then your new .EXE replaces the previous .EXE file



    When you talk about installing a windows application such as google chrome that's because it is always installed in the same directory and even if it isn't it is in the install package that scans your system for other installed versions and deletes them.

    I do not know how you are installing your app.
    The better the information you give to begin with and the sooner you reply the sooner you will get help and get your problem resolved


    When I was young and in my prime I used to program all the time but now I'm old and getting gray I only program once a day

  4. #4
    Member
    Join Date
    Mar 12
    Posts
    40

    Re: seperate installation on each install

    I am installing in the same directory. By the by, what does 'dependency' mean?

  5. #5
    PowerPoster
    Join Date
    Jan 08
    Posts
    6,775

    Re: seperate installation on each install

    It means something that your App depends on.

    For example, and very simple

    I have an App that contains a WebBrowser Control. Therefore my App is dependent on all the files (like the OCX, for example) for that control to be included with my App so it will function correctly. If I install my App on somebody's PC I must insure that the dependent files are included in the installation. Usually, however, if the other PC already has certain thing already on it (let's say it already has VB installed on it) then the WebBrowser files are already on that PC. But, what if that PC does not have VB on it?

    OK, now we know you are installing in the same directory. But how are you installing? Are you just recompiling the source code, making a new .exe file? If so, then the old .exe will be overwritten but only if you say so when prompted.
    Last edited by jmsrickland; May 25th, 2012 at 12:39 PM.
    The better the information you give to begin with and the sooner you reply the sooner you will get help and get your problem resolved


    When I was young and in my prime I used to program all the time but now I'm old and getting gray I only program once a day

  6. #6
    PowerPoster
    Join Date
    Feb 12
    Location
    West Virginia
    Posts
    4,956

    Re: seperate installation on each install

    Also keep in mind that the source code for the installer used by the deployment wizard is provided so you can modify it to suit your needs. By default the code is located here ...
    C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Setup1

  7. #7
    Fanatic Member
    Join Date
    Dec 08
    Posts
    516

    Re: seperate installation on each install

    Not sure if your reply was meant for me ?

    If it was, I am saying that you do NOT need to install again.
    If you change your code, but do not add any more controls, etc, then you do not have to create a new setup.
    You just use the option in the VB6 IDE to make an EXE.
    Then you send that EXE to the user.
    The user places it into the folder (probably a sub folder in the Program Files folder), where the previous EXE is located.
    Last edited by Bobbles; May 25th, 2012 at 04:53 PM. Reason: Had incorrect quote

  8. #8
    PowerPoster
    Join Date
    Feb 06
    Posts
    8,576

    Re: seperate installation on each install

    Quote Originally Posted by infomamun View Post
    Hi There,
    After compile, when I install a vb6 program, it installs and works well. But due to any reason (like update or debugging), if I bring change in the code, recompile it and re-install in the same pc (with previously installed same program) without uninstalling the previous one, then there is another instance of the program and a second icon creates in the 'Add or Remove Program' list.

    But when we install a windows application such as google chrome, if we install twice, thrice or more, it overrides the previous one and only one icon is shown on 'Add or Remove Program' list.

    Then why it is not happening in case of my program?
    The reason you see this behavior is that simple installer technologies like the PDW that shipped with VB6 do not have a mechansim for doing this.

    While it might be possible to to hack Setup1.vbp to accomplish this, one problem is making sure a second install accurately detects and removes your prior installation - and doesn't accidentally uninstall something entirely unrelated that "looks the same."


    Now, the PDW was meant to be replaced when Windows Installer technology came on the scene about the same time that VB6 was released. The first upgrade for VB6 was an add-on download called Visual Studio 6.0 Installer 1.0 (VSI 1.0), and it was subsequently replaced about a year later by an improved VSI 1.1, which was the last update for VS 6.0.

    VSI was not just for VB6, it also works for VFP, VC/VC++, and other languages in the Visual Studio 6.0 suite.

    As long as you had Visual Studio (or even just VB) 6.0 Pro or Enterprise you could download and use the VSI add-on for free. Sadly, Microsoft chose to stop hosting the download (2 files) a couple of years back, making VSI for 6.0 hard to come by anymore.

    And even so, there are times when the PDW is still "fine" even though it has serious shortcomings. Upgrade installs are one blind spot, and PDW setups can be a deployment nightmare in managed network shops where they like to push installs from deployment servers.


    If you can't obtain VSI 1.1 but you have a later version of Visual Studio Pro or better you can still package VB6 programs using the Installer Project suport built into those. The only thing you'll be missing is the VB6 Wizard that makes "for dummies" VSI projects easier. Of course those "for dummies" projects aren't very flexible anyway.


    So anyhoo... once you have a working method of creating Visual Studio Installer projects and you spend the time to learn how Installer and Installer packages work you can advance to the next step.

    As I said, the PDW doesn't have any "strong name" mechanism to accurately identify prior versions of the same application, but Installer does. This involves a Version number along with ProductCode and UpgradeCode GUIDs. There are even fine-grained options for updating that can just do a partial update when a minor upgrade is required, or do full uninstall-old & install-new updates.

    Windows Installer is a big topic unto itself.


    While this article Uninstall a Previously Installed Application when Upgrading an Application with Setups created in VS.NET is VS.Net oriented, almost everything there applies to VB6 and VSI 1.1 as well!

    It is one of the better "let's keep this as simple as possible" tutorials on the topic you will find anywhere.

    Of course I never said any of this is easy... but this is how you "do it right."

  9. #9
    Super Moderator Hack's Avatar
    Join Date
    Aug 01
    Location
    Searching for mendhak
    Posts
    58,283

    Re: seperate installation on each install

    Moved To Application Deployment
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  10. #10
    Member
    Join Date
    Mar 12
    Posts
    40

    Re: seperate installation on each install

    First of all thanks to all members who tried to solve my problem explaining the cause of problem. But according to me the best and right explanation is of dilettante's reply.
    Regards

  11. #11
    PowerPoster
    Join Date
    Feb 06
    Posts
    8,576

    Re: [RESOLVED] seperate installation on each install

    I only wish it were easier.

    Keep in mind that many 3rd party "scripted" installer tools (those that make non-Installer setups) can probably do this too. I just don't know of any that make it easy while also making it hard to shoot yourself in the foot. Perhaps somebody else does though and will chime in.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •