You create a Windows Installer Solution as part of your project..
This will take your main project as it's starting point and build an MSI
file for you to install with on client PC's.
Make sure you set the property "Detect NewerInstalledVersion" to True and
"RemovePreviousVersions" to true otherwise you will get errors about
"application already installed". Also, increment the version property of
the installer - this will prompt you if you want to update the product and
update codes (which you should). This should then allow you to update the
msi each time.
As far as checking that the correct version number is installed, you can
either manually include a file in with your installer with the version no in
or do as I do, and add the version number that you use in the installer
project to create a registry entry - to do this, right click the installer
project and "view registry". Create a path to the registry key that you
want and set this to [ProductVersion]
I actually read this registry key in from within the application so that I
know exactly what version I'm running (this is the version as manually typed
into the installer project rather than individual dll/executeble versions).
You may find all of this a little difficult to understand if you are not
familiar with creating installers in VS.Net (it's not all that intuitive and
the documentation relating to it is not brilliant!). Hopefully, I've given
you a few pointers to get you going.
regards
Simon
"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Thanks Simon;
That sounds like a good approach. I'll give it a try.
In creating he msi for just the upgrade (I never thought of that) I am
guessing that you create a new VSNET solution and simply drop a copy of
the
new exe in there and then build the distribution package?
Wayne
"Simon Verona" <ne**@aphroditeuk.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl... I've done this by creating a new .msi installation file for the upgrade.
What I do is have a bit of code that runs as the the application starts
that checks the version no - I do this in a similar way to that way you do it.
If an update is required, then I copy the msi file to the local PC.
At this stage I warn the user that an upgrade is required and ask then to
click ok to continue.
I then "run" the msi using the following code:
MsgBox("New DMS Update to Install, close all DMS Windows and click ok to
install", MsgBoxStyle.OKOnly, "DMS Update")
Dim pr As New Process
pr = New Process
Dim prinfo As New ProcessStartInfo
With prinfo
.FileName = "c:\dms\dms.msi"
.UseShellExecute = True
End With
pr.Start(prinfo)
and then kill the running process using the following:
' Kill all processes
For Each pr In
Process.GetProcessesByName(Process.GetCurrentProce ss.ProcessName)
pr.Kill()
Next
This seems to work for me.
Regards
Simon
"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:uo**************@TK2MSFTNGP12.phx.gbl... >I want to have my application (VB.NET) check a table on an SQL server to
>see
> if there is a newer version released and, if so, download and install the > new version. I know how to setup the database table but I am looking
> for
> ideas on how to handle the update. Since the application is running, I
> can't
> just replace that EXE. The only way I've thought of is to have a small
> front
> end app that does the version check and download if needed? I'm not sure > if
> there are problems with doing a download/replace and then calling then
> immediately executing that file.
>
> I also am considering adding some way to save the replaced EXE so the user > could do a roll-back.
>
> Has anyone implemented something like this? Any suggestions on the best
> way
> to do it?
>
> Wayne
>
>