Results 1 to 4 of 4

Thread: .NET 2005 - Setup & Deployment project

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2004
    Posts
    369

    .NET 2005 - Setup & Deployment project

    Hi,

    I created a Setup & Deploy project for a VB.NET 2005 application I have.

    The installer works, my application is installed correctly.

    My problem is regarding the shortcuts the installer creates. The part "User's Desktop" and "User's Program Menu" in the S&D project.

    In those two sections, I created a Shortcut to my application. The problem I have is that after the installation, when I click on the shortcuts, It kind of reinstall stuff.

    EXPLANATION:
    When my application is installed, in the application folder it installs a file named "Init.flag". This file is deleted the first time I start my application.

    But If I restart my application using the shortcuts, I see for about 1-2 sec a progress bar .. and my "Init.flag" file is recreated in the application folder as if the installation was reexecuted.

    If I manually create a shortcut, this does not occur and it all works. But I do not want my users to manually create a shortcut. I want them to use the ones the installer creates.

    The ShortsCuts created by the installer seems to quickly execute something before lauching my application and that causes me headaches.
    --

    I do not know if its clear ... or if anyone ever had this problem too.

    Thanks for helping.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: .NET 2005 - Setup & Deployment project

    Moved to Application Deployment

  3. #3
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: .NET 2005 - Setup & Deployment project

    You need to turn your logic around, instead of having the installer copy the file (that the application deletes) you should have your application check to see if the file's there or not, if it's not there then it's a "first run" if it is there then the program's been run 1 or more times.

    By having the application delete the file, when you use a shortcut created by the installer, it first checks to see that all the installed files are still present, if it's not, it extracts them. This is why you have turn your logic around.
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2004
    Posts
    369

    Re: .NET 2005 - Setup & Deployment project

    Thank you !

    Great answer. I reversed my logic and it works fine now.

Posting Permissions

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



Click Here to Expand Forum to Full Width