How To Create A Setup/Installation File In Visual Studio!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back to jail tech everybody in today's video i'm going to show you how you can create a setup foil for your application [Music] welcome back everybody to jr tech as just mentioned in today's video we're going to be creating a setup file so at the moment if we start this very basic application what this is going to do if i just close this we can show hello which is just a message box we can load google which has just loaded google in a different tab if i show you that again there you go and then we can also just change color of the text so a very basic application but now let's say we've done our application it's a very robust application we want to publish that elsewhere it's very simple to do the first thing you want to do is you're going to go to extensions and manage extensions you then want to go to the visual studio marketplace tools and then scroll down to setup and deployment and then this is the thing you want to install here it's the microsoft visual studio installer projects so you want to make sure that's installed you want to restart visual studio and then come back to where we are now once you've done that and you've got your product saved right click your solution um no sorry right click your project and then we're going to go add no i was right the first time on solution sorry and then go add new project and then it's going to load up your add new project window so what we can do on here is we can now just you could just type in setup and you can see setup project or you've got one here if you've used this previously you can also pin it so if you're wanting to always have this here along with um you know your framework entry whichever but we're going to hit setup project and then we're going to hit next and then you want to create this name so i normally keep this in the same folder as my other one but i just create a new folder and i'll just call it installer and then hit select folder and then we'll just we'll call this jl oops jl tech installer and then we're going to hit create and then it's going to create this funky kind of application thing and it's quite simple to set up really so the first thing we want to do is double click our applications folder and we're going to right click add project output and then we're just going to hit primary output for our setup file and then hit ok if you've got more than one project and you're compiling it so when you install you want to install multiple projects you can do that and just add them all in next we want to do is we're going to create a new shortcut we're going to go to our application folder and we're going to our shortcut's going to point towards this primary output and then you can name this your project file so this is going to be like the shortcut kind of thing so we'll just call this jl tech over here on the right hand side you can select your icon file but first before you do that you need to import it so we'll just go add file so we've added our icon file in now so we can go back to our shortcut we can then hit icon browse and then we're going to go into application folder hit our icon and then just press ok and that's done um you can add some other files as well so say if you've got like a local database or if you've got any login or anything just add it all here in your application folder this is going to be kind of the thing that goes into like the program files kind of folder next on the left we'll hit user's desktop so we want to create a shortcut here so again we're just going to point our shortcut to the primary output and we'll call it jl tech again we'll set our custom icon file which is in our application folder that we imported just click it press ok and we're done if you want to do the same again you can put it in the programs menu and you can get a lot more complex with this but just for argument's sake we're just going to do it as we've done then on the right hand side just click this installer and on your right you're now going to see loads of information so the default company name you can just change this this is what's going to show up in like control panel so if i show you my control panel and you can see all of these publishers that's kind of what's going to show you here um you need to be backwards compatible leave that true or false install to all users or just the one user that it's installed in we'll go all manufacturer again we'll just call this jl attack again uh remove previous version so let's say this is version 1.0.0 if somebody is installing version 1.0.1 say you've released the patch it's going to say you need to uninstall the old one first it's going to enforce that i always leave that false as it just creates a an issue but if you've got loads of things like local databases connection strings and you know application settings it might be easier to just put that to true so we'll do that post build event you can do it on a successful build you can basically set it to do something once it's installed so once it's installed you could send it to like a web page and you can kind of say thanks for downloading the application you have your target platform so we're on 64. you have 6480 bit or whatever that is um i don't really know what that is maybe that's for both of them um but i always just do two installers so one for 64.1 for 32-bit and you have your version number so let's just say this is one point 1.1 for instance um it'll say that just press yes you can add the descriptions we'll just say jl tech example post build event so in here you could do a command to like say load google or whichever um but just a very brief run through of what it is so now what we can do is we can close down this we can save and then on our installer just right click and hit build and you can see at the bottom here we're going to get our progress [Music] there you go once succeeded so now what we can do is we can load up our drive we can go visual studio vb tutorials setup file installer go into the debug folder and then you have two installer types so you can use this one or this one it's completely up to you i always go for the windows installer rather than the application so we'll double click it we'll close down visual studio for now we'll hit next we'll install everyone so when we selected install all users that's why it's defaulted to everyone but people still can change it if you left that to false it would only have selected for just me so it only installed for the one user but we'll go everyone actually know we'll go just me and then we'll hit next and then you should in a second see an icon on the desktop for our jltech application give it a few seconds [Music] there we go we can hit close and we're now installed you can see our icon is here on our desktop and if we go into control panel we go uninstall a program we can find jltec installer um jltech the date we installed it and the version is 1.1.1 which is what we selected so if we now run this it's just basically our application so we can show hello we can load google or we can change color for that text there so that's pretty much it that's how you create an installer for your windows 4 application in visual basic.net if you did learn something from this video if you did enjoy it please do drop a like rating and subscribe to the channel and i will see you all next time peace from the first date
Info
Channel: JL Tech
Views: 957
Rating: 4.826087 out of 5
Keywords: visual studio, visual basic, login, form, .net, c#, code, pastebin, source, sourcecode, source code, vb.net, stylish, msql, database, josh, leatherland, Josh Leatherland
Id: he9LaB6R_mY
Channel Id: undefined
Length: 7min 45sec (465 seconds)
Published: Sun Jun 20 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.