Today we start article about application launcher with autoupdate feature. By default Visual Studio offers ClickOnce publishing. It has lot of nice features with all kind bells and whistles.
But there area also some shortcomings like hardcoded url for update and install, no option to have simultaneously installed multiple versions of same application, no option to pass command line parameters and a quite cryptic location where application is installed.
There are several nice articles about application launchers and some of them we will refer here too. One good staring point is C# .NET Autoupdate Application Launcher by Jonathan Franks.
Project goals
General task ahead is is next – we need software installer what is capable of
- installing from intranet or internet using not hardcoded url
- creating shortcuts
- checking form web page available application versions
- showing new versions and release notes for them
- optionally showing older versions for rollback
- allowing different versions installed simultaneously
- allowing command line parametes
- upgrading launcher itself
- verify authenticity of installer package.
For a start we create a simple Windows application
Primary task will be to fetch web page with files listing and parse it. Default url will is set but it can be overwritten for future use. In case of this project the updates will be provided to third-parties and they will publish updates on local servers. To simplify process there will be only one task to do – copy files to update folder.
Configuring IIS
By default IIS is not showing directory listing, so browsing freshly made directory c:\inetpub\wwwroot\appupdate\ will end up with error:
So this issue will take us from actual programming to IIS configuration. Start IIS manager (screenshots are made on Win 10 Pro) , focus needed directory
and enable directory browsing
Much better now :
Showing the created web.confing feels not right, so let’s hide it:
Now we have IIS directory browsing set and are ready to create some code in Part 2.