How do popular applications update and install? - c#

I know this question has been asked lots of times but mostly I couldnt find the answer I was looking for.
How do popular applications update themselfs ?
I found some libraries that update applications but mostly they just replace all the application files. This way my Updater would need to download around 200mb everytime.
Also ClickOnce is used a lot but this in my oppinion is an ugly way to update and install because the GUI is not really fancy and you can't even specify where to install the application.
I know some applications also replace the installer and just run the new one to deinstall the old version and install the new one but that cant be that right way...
So how do Programs like Mobirise, Discord or Teamspeak update themselfs ?

I have a have made a POS Solution(C#), working in 4 Shops.
This is what i've done to give client side updates.
Used Google Drive to upload installer file + a text file mentioning installer version, once uploaded each time the programe starts up it downloads the version text file from Google Drive, if it doesn't match the current version of the software which the clients Has, Messagebox Prompts a newer version is avaliable. Client then can click Upgrade and it will download the installer file, once downloaded software exits completely calling a python script which will Run the installer file.
This is not the best way but it works, becouse Google Drive has its own file version history which makes it easy for me to keep track of updates i send.
Hope I Helped <3

You can design the application to be patchable.
Patching is not a hot flavour in windows world.

Related

Auto Patcher for game (Efficient Auto Updater)

I want an auto updater that detect modified game files (by comparing files on the client-side and a server) and only download modified files.
The scenario is that there's about one thousand clients in a network, that use same application. If a new version of the application is available, they all have to get the new version.
I see a www.aldera.to game if you install the files their Aelra_patcher application auto patch the files from the server side. It do the exact thing I want:Getting the newest files from server when the patcher is run. But the problem is that clients wrote in C#, and I can't use IcePatch2 inside my application.
So far, the best solution I found is to get .NET Application Updater Component and customize it to fit my needs. But I prefer a solution that dose not require me to maintain another application.
Any idea?
Managing file locks is fairly simple. The process should go something like this:
The game application downloads the installer, if there is any
The game application runs the installer and exits
The installer starts doing the work of updating files as needed. If any files are locked it may wait a short while and try again, or ask the user if it is ok to close the application that have locked the files.
But the topic of minimizing update time and bandwith is a fairly complex. You might want to read Raymon Chens articles on Windows Update Formats to get some appreciation for the various issues.
I'm not familiar with IcePatch2, but it seems to be a fairly generic file synchronization tool. This may be appropriate for your specific use case, but I would expect some use cases to benefit from a more specialized approach. You could for example use knowledge of things like file or resource versions to avoid much of the work a more generic tool has to do.

How to trigger ClickOnce re-install without new version?

So I have a Windows Forms app that uses an encrypted connection string for the database.
Every quarter we change the database password, but the vendor only upgrades this app maybe every 12 or 18 months. So because of this, the "appname.exe.config.deploy" file that is hosted on the clickonce webserver would have our new password--but the hundreds of desktops would still have the old .config file with the old password because the verision has not changed.
I know I can delete the %userprofile%\AppData\Local\Apps\2.0\ folder (deleting potential unrelated click-once apps in the process), but we are talking hundreds of desktops and that's not really feasible here.
I would like to know if/how I can tweak the .manifest or whatever in order to "fake" the clickonce to think it needs to re-install. I can't imagine I'm the first one with this issue but I've found nothing satisfactory in my searches so far.
Thank you.
Unfortunately install\reinstall process initiating when no application installed or version has changed.
I don't understanding, why so important having old one ClickOnce version, because your clients will make update process anyway.
If new copy installation is fine for your clients, then you can set new "Application instance name". Your customers launch will do new instance installation of your application. I'm really don't know how to change this name from Visual Studio or Mage.exe, but you can download my utility from second download link here. [Choose] your application folder -> [Update] action -> Add any prefix for [Application instance name] field value (for example "_1") -> [Build] + [OK].
Anyway, version increment is the best solution for you.

Publish & Update over SFTP with Visual Studio

I'm currently searching for a way to make it possible to deploy and update a C# .NET application over SFTP. Background is that most of my users do not have admin rights, internet access rights or common file structures/group policies. The best I could actually get was the ability to also use the SFTP-infrastructure the application already uses for data transfers.
So I tried using Visual Studio publish, which can deploy the application initially, however it does not support the update mechanisms (it only supports URLs and File Paths). A manual update/deployment process is out of the question, however, purely through the sheer size of the userbase (1000+ users).
I then had a look at wyBuild, a third-party build-tool that can actually use sftp to upload Updates. It can not, however, download them via sftp.
So I'm reaching somewhat the end of my rope here. Writing an updater myself seems like a large time investment, but I could not find any other solution. How would this problem be solvable? Thanks for any help in advance.
Oh, and before somebody flags for "asking for a tutorial", I tried hard to stay within the guidelines stackoverflow provides here

Game Launcher and Updater for Windows

So, I want to create a simple launcher for a game that I'm making for Windows. I want to write it on Visual Studio so it can do the following:
Launch the game wherever the .exe file is. (either via registry key or by the user selecting the destination)
Auto-install all the needed dependences for the game if they are missing or provide a link to install them.
Verify intergrity of the files.
Auto download the latest patch or take the user to the patch download site (optional).
In addition of these, I need some help on the following:
Assuming that I can set it up to download the patch, how can I deliver it? I'm not sure that the program can download files from SkyDrive can it?
How do I set it up as a 32-bit program? I have a 64-bit system here.
Is it possible to write a Metro version of the launcher using the same code?
Please note that the game will be in a "installable format". I'll be using Install Creator for this.
Thanks for any help in advance.
I've written a similar software before for a game, that did almost the same things as you described. Given that you have not shown any code, I'll answer the 3 questions in a general, basic way.
1.) Depends on what you mean by patch. An installer that supposed to replace or extend existing files, delete old files, deploy new ones? In that case it's up to the installer to manage it. If a patch simply downloads a file and puts it in the right place you can download it from either Skydrive (DriveOne) or any other place. Check out the API and the examples here.
2.) I'm not sure I understand this question, but I think you just want to compile your binary to 32bit in visual studio and that's it.
3.) Yes.

Windows Form Application : Publish issue

I'm very new to Visual Studio 2010. I decided to create a simple WFA with C#.
Everything work fine with Images and Audio playback. My intention is to create a standalone application and send it to my friend as a gift. Problem I facing now is that when I tried to publish the application, the Images / Audio is still using the same location in my PC. So it won't play nor display any images.
Any comment on this or guide for me? I did try search for solution but doesn't seems to have any luck.
This is the code that I used to play Audio :
SoundPlayer ply = new SoundPlayer(#"C:\Users\Liam619\Documents\Visual Studio 2010\Projects\BirthdayApp\BirthdayApp\Resources\BirthdaySong.wav");
If I remove or change the path, the Application will hit error for locating the Audio file.
There may be several solutions to your problem.
a) embed the sound into a resource. As a beginner, resources may be a bit tricky to get it right the first time. But I want to encourage you reading something about it. You'll need resources when you want to translate your first program.
b) create an installer which copies the sound file to the installation directory. Try InnoSetup. If you're a programmer, sooner or later, you'll need to create a Setup anyway. Always worth knowing how to do that.
In that case, you still need the path to the sound file, but if you install your EXE into the same path as the sound file, see getting the application's executable directory.
everything in the database whether images or audio refers to your own server database.you have to send the database too with the app and the correct version .NET framework needs to be installed on the target PC.

Categories