Results 1 to 15 of 15

Thread: How do I distribute my VB app to a friend ?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2014
    Posts
    313

    How do I distribute my VB app to a friend ?

    Simply sharing the .EXE file is not enough, I bet.
    I just wonder if there is a way around that entirely.
    Today's users just want to click a link.
    Not install some attachment
    Just wondering if something like that has been developed in the last 20 years of VB

    Is there a way to put it on a website?
    I tried ClickOnce a few years ago, but could not get it to work.

    What are my options in 2020 ?

  2. #2
    Hyperactive Member
    Join Date
    Mar 2018
    Posts
    395

    Re: How do I distribute my VB app to a friend ?

    yeah I am seeking a solution as well, ClickOnce may be our best option I have not yet tried to implement it though so I don't know what is involved until I get to trying it.
    I do remember with VB6 and under though we had the ability to just zip the needed files in one zip file for the end user the unzip into a directory and it would work since it included the runtime files and and other necessary files but now that we need to include framework versions so it is not that simple any more..

    Can we still just zip the needed files like runtimes and what not and then they would just be required to install the proper version framework?
    This would still be a pain for them though and if they are going to need to install the framework anyways then why not just do one full installer..
    Unless they might already have the appropriate framework version already installed, which could be possible and then you could just zip them into a zip file?

    I never liked the fact of the framework it just seems to make things more complicated.
    Always loved the way older VB versions had things, easier for users to just grab the files and run the programs..

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2014
    Posts
    313

    Re: How do I distribute my VB app to a friend ?

    Where is ClickOnce ?

  4. #4
    Hyperactive Member
    Join Date
    Mar 2018
    Posts
    395

    Re: How do I distribute my VB app to a friend ?

    in the Solution Explorer, left click on your project name then right click and select Publish, the Publish Wizard will come up.
    Even though it does not seem to say ClickOnce I think this is how you do this because someone here told me that VS uses ClickOnce technology in the Publish settings..
    I am really not sure to be honest so don't quote me on this.

    I actually need to figure this out as well..

    Good Luck and let me know if you figure out how to use or access it.

  5. #5
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,116

    Re: How do I distribute my VB app to a friend ?

    As it was with VB 6.0 executable files, the answer is it depends (pun intended).

    If your executable file relies on an external data file, then that data file needs to be distributed along with the .exe file. That was the same with VB 6.0.

    The same with if your program uses an external component (likely a .dll for VB.NET, or a .ocx for VB 6.0), that file would need to be distributed with your program.

    If your program is a simple standalone .exe file with no dependencies other than the presence of the appropriate runtime files/framework, then you can distribute just the .exe file. True for both VB 6.0 and VB.NET programs.

    The fact that there are numerous versions of the .NET framework is a function of the continued development and support of the .NET development environment.

    Had Visual Basic 6.0 continued to be updated, upgraded, etc., there would have been an msvbvm70.dll, msvbvm80.dll, etc., and it would have been necessary to distribute updated classic VB runtime files to older OS's like Windows Vista, 7, 8, etc. similar to how newer versions of the .NET Framework need to be deployed today.

    VB 6.0 being abandoned is the thing that has made it convenient to still distribute VB 6.0 programs, since all of the necessary runtime files have been essentially frozen in time and are ubiquitous.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2014
    Posts
    313

    Re: How do I distribute my VB app to a friend ?

    Quote Originally Posted by DreamWarrior77 View Post
    in the Solution Explorer, left click on your project name then right click and select Publish, the Publish Wizard will come up.
    Even though it does not seem to say ClickOnce I think this is how you do this because someone here told me that VS uses ClickOnce technology in the Publish settings..
    I am really not sure to be honest so don't quote me on this.

    I actually need to figure this out as well..

    Good Luck and let me know if you figure out how to use or access it.

    Too complicated for me.
    Not sure why it's asking for a web URL to create a setup.exe on my local drive.
    How stupid.

  7. #7
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,458

    Re: How do I distribute my VB app to a friend ?

    Quote Originally Posted by RipVoidWinkle View Post
    Too complicated for me.
    Not sure why it's asking for a web URL to create a setup.exe on my local drive.
    How stupid.
    Probably because Click Once is designed to allow installation from a website. On VS 2019 if you go through the publish wizard there is an option for local folder. That should produce a folder with everything needed to run the application

  8. #8
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,464

    Re: How do I distribute my VB app to a friend ?

    Quote Originally Posted by OptionBase1 View Post
    As it was with VB 6.0 executable files, the answer is it depends (pun intended).

    If your executable file relies on an external data file, then that data file needs to be distributed along with the .exe file. That was the same with VB 6.0.

    The same with if your program uses an external component (likely a .dll for VB.NET, or a .ocx for VB 6.0), that file would need to be distributed with your program.

    If your program is a simple standalone .exe file with no dependencies other than the presence of the appropriate runtime files/framework, then you can distribute just the .exe file. True for both VB 6.0 and VB.NET programs.

    The fact that there are numerous versions of the .NET framework is a function of the continued development and support of the .NET development environment.

    Had Visual Basic 6.0 continued to be updated, upgraded, etc., there would have been an msvbvm70.dll, msvbvm80.dll, etc., and it would have been necessary to distribute updated classic VB runtime files to older OS's like Windows Vista, 7, 8, etc. similar to how newer versions of the .NET Framework need to be deployed today.

    VB 6.0 being abandoned is the thing that has made it convenient to still distribute VB 6.0 programs, since all of the necessary runtime files have been essentially frozen in time and are ubiquitous.
    VB6??? You mean vbrun600.dll?

  9. #9
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,116

    Re: How do I distribute my VB app to a friend ?

    Quote Originally Posted by .paul. View Post
    VB6??? You mean vbrun600.dll?
    You quote my entire post with a response of "VB6???" What, exactly, is that "question" referring to in my post?

    Edit: And no, of course I don't mean vbrun600.dll, because that file never existed as a dependency for VB 6 programs. The dependency that did exist (which I made inferential reference to) that I think you might be referring to, is msvbvm60.dll.

  10. #10
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,464

    Re: How do I distribute my VB app to a friend ?

    Quote Originally Posted by OptionBase1 View Post
    The dependency that did exist (which I made inferential reference to) that I think you might be referring to, is msvbvm60.dll.
    You are correct. That is what i was referring to

  11. #11
    Hyperactive Member
    Join Date
    Mar 2018
    Posts
    395

    Re: How do I distribute my VB app to a friend ?

    Yeah but the cool thing with vb6 was that you could include it all, I mean everything needed in one folder and it would just work.
    With VB .net it's not like you could put the framework right into the app folder and just run it this way..

    I sure wish that had some way to not require the framework or maybe to somehow only compile a .net framework file of what your specific program uses and then you could just include that in the app directory making it very portable.

    I know Launchbox (Video Game Emulator Organizer Software) does a type of portable installation into a directory but it still requires you to do a regular install but I think you can move it around after installation to whatever directory you want to.. I think this is just for the .net framework mostly and in this case DirectX but.. just giving a more modern example.

    I really hope for a portable solution as well but technically you just do what OptionBase1 is saying I think and include all required files by your program and then the user would need to install the proper .net framework unless it is already installed on their machine. How do we find out all the files our programs require though? Is there a way to find this out?

  12. #12
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,464

    Re: How do I distribute my VB app to a friend ?

    The files your app. requires are those you create. If you create a proper Microsoft Installer application for your app. it'll check if the necessary framework is installed and install if necessary...

  13. #13
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: How do I distribute my VB app to a friend ?

    Quote Originally Posted by DreamWarrior77 View Post
    Yeah but the cool thing with vb6 was that you could include it all, I mean everything needed in one folder and it would just work.
    With VB .net it's not like you could put the framework right into the app folder and just run it this way..

    I sure wish that had some way to not require the framework or maybe to somehow only compile a .net framework file of what your specific program uses and then you could just include that in the app directory making it very portable.

    I know Launchbox (Video Game Emulator Organizer Software) does a type of portable installation into a directory but it still requires you to do a regular install but I think you can move it around after installation to whatever directory you want to.. I think this is just for the .net framework mostly and in this case DirectX but.. just giving a more modern example.

    I really hope for a portable solution as well but technically you just do what OptionBase1 is saying I think and include all required files by your program and then the user would need to install the proper .net framework unless it is already installed on their machine. How do we find out all the files our programs require though? Is there a way to find this out?
    Maybe take a look at the Publish page of the project properties. If you had researched ClickOnce, which you really ought to have by now, then I'd expect you to have been led to that page by now. This page:

    https://docs.microsoft.com/en-us/vis...t?view=vs-2019

    was one of the first result in a web search simply for "clickonce". It seems like anyone interested in the topic ought to be working their way through that page and following relevant links.

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2014
    Posts
    313

    Re: How do I distribute my VB app to a friend ?

    Ok, I tested this out and it sort of works.
    Project -> Properties -> Publish

    I specified a local file path folder
    I made up a gibberish installation URL (no idea what that's about)

    I then uploaded the entire folder to my webserver.

    The URL had to be referenced manually (not like index.html)
    http://www.MYSITE.com/PROJECT_NAME/publish.htm

    Friend was able to install and run the app!
    One issue is that the person installing my program gets a bunch of "Unauth" errors and warnings.
    Anyone know how to your app a valid/signed/safe program?

    One other bug I noticed:

    Publisher:

    The following prerequisites are required:

    Microsoft .NET Framework 4.7.2 (x86 and x64)
    If these components are already installed, you can launch the application now. Otherwise, click the button below to install the prerequisites and run the application.

    Install
    The word "launch" is a hyperlink to
    http://MYSITE.com/PROJECT_NAME/PROJECT_NAME.application
    which does not launch anything, but just displays some XML in the browser.
    Last edited by RipVoidWinkle; Nov 18th, 2020 at 12:31 PM.

  15. #15

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2014
    Posts
    313

    Re: How do I distribute my VB app to a friend ?

    Weird.
    I tried to do this with a new app.
    It did not generate any kind of publish.html file this time

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