Sep
20
Written by:
Steve Gray
9/20/2010 6:59 AM
Recently I wrote an ‘updater’ app that other apps call to check for a new version, the whole thing runs off of a web service. At any rate, I needed the calling app to send it’s machine name and the current application name. Never needed that before…
Dim assem As Assembly = Assembly.GetEntryAssembly()
Dim assemName As AssemblyName = assem.GetName()
Dim ver As Version = assemName.Version
Here’s another way to get the machine name
Environment.MachineName.ToString
I also needed to know where the user’s applicationData folder was…
strApplicationData = _
(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData))
strDataFile = Path.Combine(strApplicationData, "Importer\ImporterData.xml")
As always, I welcome your comments!