![]() |
|
[C#] [TuT] [VB .Net | C#] Simple Updating System - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C#] [TuT] [VB .Net | C#] Simple Updating System (/showthread.php?tid=528186) |
[TuT] [VB .Net | C#] Simple Updating System - xFic - Jul 8, 2010 Heres some code to make a simple updating system using command line parameters 😉 Create a new project then add the below code to your main forms load event. VB .Net Code If Environment.GetCommandLineArgs.Length > 1 ThenC# Code if (Environment.GetCommandLineArgs().Length > 1)WAIT BUT HOW DOES THIS WORK?!... It's simple, you get your application to download the new exe to the SAME directory your applications currently in. Then you get your application to start the new exe with the code below. the new exe will then close and delete the old one. VB .Net Code Process.Start("new.exe", "update " & My.Application.Info.AssemblyName)C# Code Process.Start("new.exe", "update " + this.GetType().Assembly.GetName().Name.ToString());* - bobinski - Dec 28, 2012 interesting and how to check if update avaible? * - Tafelpoot - Dec 28, 2012 lohol thats not familiar to other programs , delete and start a new one * - Dark_Noodles - Dec 28, 2012 (Dec 28, 2012 11:37 AM)bobinski Wrote: interesting and how to check if update avaible? Holy shit, thanks for bringing back a two year old thread. |